Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 30, 2011, 11:06:36 PM (13 years ago)
Author:
landauf
Message:

Replaced COUT in util with orxout.
Used user_error for Exceptions and Assertions because I assume they're only used in very critical situations. Same with Signal Handler.
Clipboard shows user_errors because it's used only with user interaction.
Other output is mostly internal.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/output/src/libraries/util/OrxAssert.h

    r8788 r8804  
    4646/** Run time assertion like assert(), but with an embedded message.
    4747@details
    48     The message will be printed as error with COUT(1). <br>
     48    The message will be printed as error with orxout(user_error). <br>
    4949    You can use the same magic here as you can with \ref ThrowException
    5050    @code
     
    5757        if (!(condition)) \
    5858        { \
    59             COUT(1) << __FILE__ << "(" << __LINE__ << "): "; \
    60             COUT(1) << "Assertion failed in " << __FUNCTIONNAME__ << std::endl; \
    61             COUT(1) << "Expression: " << #condition << std::endl; \
    62             COUT(1) << "Message   : " << errorMessage << std::endl; \
     59            orxout(user_error) << __FILE__ << "(" << __LINE__ << "): "; \
     60            orxout(user_error) << "Assertion failed in " << __FUNCTIONNAME__ << endl; \
     61            orxout(user_error) << "Expression: " << #condition << endl; \
     62            orxout(user_error) << "Message   : " << errorMessage << endl; \
    6363            /* Don't use the condition again to avoid double evaluation */ \
    6464            /* Instead, stringify the expression and negate it */ \
     
    7070    mode (no abort() triggered then).
    7171@details
    72     The message will be printed as error with COUT(1). <br>
     72    The message will be printed as error with orxout(user_error). <br>
    7373    You can use the same magic here as you can with \ref ThrowException
    7474    @code
     
    8181        if (!(condition)) \
    8282        { \
    83             COUT(1) << __FILE__ << "(" << __LINE__ << "): "; \
    84             COUT(1) << "Verification failed in " << __FUNCTIONNAME__ << std::endl; \
    85             COUT(1) << "Expression: " << #condition << std::endl; \
    86             COUT(1) << "Message   : " << errorMessage << std::endl; \
     83            orxout(user_error) << __FILE__ << "(" << __LINE__ << "): "; \
     84            orxout(user_error) << "Verification failed in " << __FUNCTIONNAME__ << endl; \
     85            orxout(user_error) << "Expression: " << #condition << endl; \
     86            orxout(user_error) << "Message   : " << errorMessage << endl; \
    8787            /* Don't use the condition again to avoid double evaluation */ \
    8888            /* Instead, stringify the expression and negate it */ \
     
    100100        if (!(condition)) \
    101101        { \
    102             COUT(1) << __FILE__ << "(" << __LINE__ << "): "; \
    103             COUT(1) << "Verification failed in " << __FUNCTIONNAME__ << std::endl; \
    104             COUT(1) << "Expression: " << #condition << std::endl; \
    105             COUT(1) << "Message   : " << errorMessage << std::endl; \
     102            orxout(user_error) << __FILE__ << "(" << __LINE__ << "): "; \
     103            orxout(user_error) << "Verification failed in " << __FUNCTIONNAME__ << endl; \
     104            orxout(user_error) << "Expression: " << #condition << endl; \
     105            orxout(user_error) << "Message   : " << errorMessage << endl; \
    106106            /* No assert() in release configuration */ \
    107107        } \
Note: See TracChangeset for help on using the changeset viewer.