Changes between Version 4 and Version 5 of code/Error_handling
- Timestamp:
- Aug 22, 2011, 3:02:11 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
code/Error_handling
v4 v5 9 9 [[br]] 10 10 11 == COUT(#), displays messages ==12 Whenever you want to show the user or the programmer a message, use COUT(#) where # is a number denoting the output [wiki:Debug level]. [[br]]11 == orxout(#), displays messages == 12 Whenever you want to show the user or the programmer a message, use orxout(#) where # is the level of your output. See [wiki:Output] for more information. [[br]] 13 13 14 '''Note: A simple message with level 1 doesn't trigger an exception or anything yet!''' [[br]]14 '''Note: A simple message with level user_error (or internal_error) doesn't trigger an exception or anything yet''' 15 15 16 16 == Exceptions == … … 39 39 '''Important: Asserts are only useful when the mistake is in the program. Throwing asserts for bad input doesn't help anyone, use exceptions then! [[br]] 40 40 41 Usage: 'assert(condition you assume);' or when you want to tell more use 'OrxAssert(condition, message)'. The message gets then displayed via COUT(1) before the assert() macro is called. [[br]]41 Usage: 'assert(condition you assume);' or when you want to tell more use 'OrxAssert(condition, message)'. The message gets then displayed via orxout(user_error) before the assert() macro is called. [[br]] 42 42 The example above would then read: 43 43