Home
Support

Knowledge Base

BSPs and drivers
Community resources
Product documentation
Questions?
Contact us

Documentation for exception-handling
 
________________________________________________________________________

Applicable Environment
________________________________________________________________________
  • Topic: Documentation for exception-handling
  • SDP: 6.3.0
  • Target: Any supported target
________________________________________________________________________

Question
________________________________________________________________________


Could you direct me to your documentation on exception-handling? I am currently using try/catch successfully with exceptions thrown by myself but I would also like to catch system-generated exceptions such as 'divide-by-zero'. Does the system generate an exception-object or just an integer such as 'FP_X_DZ'.
I can't seem to find anything in the common docs such as neutrino_programmers_guide', 'QNX Neutrino RTOS - Library Reference' etc.

________________________________________________________________________

Recommendation
________________________________________________________________________

CPU/FPU exceptions are something other than C++ exceptions. A CPU exception will be caught by the kernel, converted into a signal and delivered to the offending process. So for CPU exceptions, exception handling is effectively signal handling (e.g. handling SIGFPE for div by 0). Mapping CPU exceptions to C++ exceptions is not trivial, since signals are fully asynchronous - which C++ exceptions are not.

________________________________________________________________________
NOTE: This entry has been validated against the SDP version listed above. Use caution when considering this advice for any other SDP version. For supported releases, please reach out to QNX Technical Support if you have any questions/concerns.
________________________________________________________________________


Related Attachments
 None Found





Please contact us with your questions or concerns.