Class SoErrorStack


  • public class SoErrorStack
    extends SoError
    Stack debugging handler. SoErrorStack is used to obtain and/or report the program callstack.

    The post() method gets the actual callstack and calls a custom callback, if one is defined, else it dumps the callstack using SoDebugError.

    It is also possible to allow SoStackError to automaticaly report the callstack, when a signal is reported by the system, by setting OIV_DEBUG_STACKERROR to 1.

    See Also:
    SoReadError
    • Method Detail

      • setHandlerCallback

        public static void setHandlerCallback​(SoErrorStack.Handler h)
        Sets the handler for SoErrorStack class.
      • getStackFrames

        public java.util.ArrayList<SoErrorStack.StackFrame> getStackFrames()
        Returns the stack frames of the current callback stack. This function is useful to get the stack frames when the custom callback is called.

        Returns:
        The list of frames in the actual callstack.

      • post

        public static void post()
        Posts the current callstack to the application callback or to SoDebugError if the custom callback was not specified.
      • getStack

        public java.lang.String getStack()
        This function returns a decoded version of the getStackFrames() function.

        Returns:
        A string which contains a human readable version of the stack.