Package com.openinventor.inventor.errors
Class SoErrorStack
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.errors.SoError
-
- com.openinventor.inventor.errors.SoErrorStack
-
public class SoErrorStack extends SoError
Stack debugging handler.SoErrorStackis 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 usingSoDebugError.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSoErrorStack.Handlerstatic classSoErrorStack.StackFrameThis struture contains the description of a stack frame.-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetStack()This function returns a decoded version of thegetStackFrames()function.java.util.ArrayList<SoErrorStack.StackFrame>getStackFrames()Returns the stack frames of the current callback stack.static voidpost()Posts the current callstack to the application callback or toSoDebugErrorif the custom callback was not specified.static voidsetHandlerCallback(SoErrorStack.Handler h)Sets the handler for SoErrorStack class.-
Methods inherited from class com.openinventor.inventor.errors.SoError
getDebugString, post, setHandlerCallback
-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
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 toSoDebugErrorif the custom callback was not specified.
-
getStack
public java.lang.String getStack()
This function returns a decoded version of thegetStackFrames()function.- Returns:
- A string which contains a human readable version of the stack.
-
-