Result = ErrorCode()Description
Returns the error code of the currently handled error. This command only returns a meaningful value if there was an error handled by OnErrorCall() or OnErrorGoto().
Returns one of the following values:#PB_OnError_InvalidMemory : Read or write operation on an invalid location #PB_OnError_Floatingpoint : Floating-point error #PB_OnError_Breakpoint : Debugger breakpoint reached (non-PureBasic breakpoints) #PB_OnError_IllegalInstruction : Attempt to execute an illegal instruction #PB_OnError_PriviledgedInstruction: Attempt to execute a privileged (system-) instruction #PB_OnError_DivideByZero : Division by zero (Windows only)Linux and Mac OSX report #PB_OnError_Floatingpoint for division by zero errors.
In addition, every OS may have more possible error values. On Windows, custom errors can be raised with the RaiseError() command.