Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 6 and Version 7 of code/doc/Exception


Ignore:
Timestamp:
Aug 22, 2011, 1:55:01 PM (13 years ago)
Author:
landauf
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • code/doc/Exception

    v6 v7  
    44This article assumes that you know what an Exception is and how to throw it. Otherwise, see [http://en.wikipedia.org/wiki/Exception_handling wikipedia] or [http://www.cplusplus.com/doc/tutorial/exceptions.html cpluscplus.com]. [[br]][[br]]
    55
    6 When an exception gets thrown, its message, containing file, line number, function name, exception type and programmer message, is displayed via COUT(4). That means you usually don't see them anywhere because it is better left up to the programmer to display the message at the right position. But you can still open the log and search for it unless the log debug level is below 4. [[br]][[br]]
     6When an exception gets thrown, its message, containing file, line number, function name, exception type and programmer message, is displayed via {{{orxout(internal_error)}}}. That means the user usually doesn't see them anywhere because it is better left up to the programmer to display the message at the right position. But you can still open the log and search for it unless the log debug level is below {{{internal_error}}}. [[br]][[br]]
    77
    88To throw an exception you best use the 'ThrowException(type, message)' macro that automatically adds line number, function and file name. 'Type' is a user defined derived class of orxonox::Exception so that different exceptions can be caught with different 'catch' clauses. [[br]]