#include "state.cfg"

#ifndef STATE_USE_EXCEPT
#error The variable STATE_USE_EXEPT must be defined!!!
#endif

#if STATE_USE_EXCEPT == 1
#define BEGIN_BEHAVIOR_CTRL   /* ===== BEGIN_BEHAVIOR_CTRL ===== */\
  set_terminate(State::terminate);\
  try\
  {\
/* =============================== */
#define END_BEHAVIOR_CTRL     /* ===== END_BEHAVIOR_CTRL ===== */\
  }\
  catch (StateInternalError erreur)\
  {\
    erreur.display();\
    abort();\
  }\
  catch (StateBehaviorError erreur)\
  {\
    erreur.display();\
    abort();\
  }\
/* ============================= */
#else
#define BEGIN_BEHAVIOR_CTRL   /* ===== BEGIN_BEHAVIOR_CTRL ===== */
#define END_BEHAVIOR_CTRL     /* ===== END_BEHAVIOR_CTRL ===== */
#endif
