Error Handling

From Armagetron
Revision as of 23:44, 12 May 2007 by 216.80.66.146 (talk)
  • tASSERT: assertions, active in debug mode only. like c's assert(). Fatal program halt if the argument is false.
  • tVERIFY: the same, but active also in optimized mode.
  • st_PresentMessage(): displays/prints an error/warning message with a short caption (gets to be a title) and a longer message text. Execution continues after that.
  • st_PresentError(): the same, but exits with a fatal error after it's done.
  • tERR_WARN: prints a warning message on the console with reference to the function and source file it came from.
  • tERR_MESSAGE: similar, but uses st_PresentMessage() which makes the message more visible.
  • tERR_ERROR: still the same as tERR_WARN, but aborts.
  • tERR_ERROR_INT: internal error notifier. Same as tERR_ERROR, but asks to send bug reports.

st_Breakpoint(): does nothing useful, but in GDB, a breakpoint is set there, so if you want a breakpoint you don't have to reset on every debug session, call this.

The rest is flow control output stuff and is much less useful than anticipated. Either it gives too little or too much information. I don't use it any more.

Error: Rage 128 timed out... exiting (go to detail settings and turn off textures...problem solved)