Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Exception handling

When an exception occurs, such as dividing by zero or an access violation, the result depends on whether the thread has an exception handler.

If a thread has no exception handler or has an exception handler which will not handle the type of exception identified by the TExcType enumeration, then the exception is passed to the Kernel for handling. The default action is to panic the offending thread.

If a thread has an exception handler, then the handler is executed in the context of the thread on which the exception is raised; control returns to the point of exception.

The result of an unhandled exception caused by calling RThread::RaiseException() depends on whether the exception is being raised on the caller's own thread or another thread. If a thread calls RaiseException() on itself and there is no handler for that type of exception, then a KERN-EXEC 3 panic is raised. If a thread calls RaiseException() on another thread, then that thread ends with reason code KErrDied.

The following functions are involved in exception handling: