12.07.2015 Views

RAPID reference manual - Technology

RAPID reference manual - Technology

RAPID reference manual - Technology

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

InstructionRAISERobotWare-OSRAISE - Calls an error handlerRAISE is used to create an error in the program and then to call the error handler of theroutine. RAISE can also be used in the error handler to propagate the current error tothe error handler of the calling routine.This instruction can, for example, be used to jump back to a higher level in the structureof the program, e.g. to the error handler in the main routine, if an error occurs at a lowerlevel.ExampleIF ...IF ...IF ...RAISE escape1;.ERRORIF ERRNO=escape1 RAISE;The routine is interrupted to enable it to remove itself from a low level in the program.A jump occurs to the error handler of the called routine.ArgumentsRAISE [ Error no. ]Error no.Data type: errnumError number: Any number between 1 and 90 which the error handler can use tolocate the error that has occurred (the ERRNO system variable).It is also possible to book an error number outside the range 1-90 with theinstruction BookErrNo.The error number must be specified outside the error handler in a RAISE instructionin order to be able to transfer execution to the error handler of that routine.If the instruction is present in a routine’s error handler, the error number may notbe specified. In this case, the error is propagated to the error handler of the callingroutine.<strong>RAPID</strong> <strong>reference</strong> <strong>manual</strong> - part 1a, Instructions A-R 369

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!