User Tools

Site Tools


en:onerror

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:onerror [2016/05/23 19:19]
admin
en:onerror [2020/02/28 10:46]
Line 1: Line 1:
-===== OnError (Statement) ===== 
- 
-==== Format ==== 
-**onerror** //label// 
- 
-==== Description ==== 
-Causes the [[GosubReturn|Gosub]] at //label// to be executed when a runtime error occurs.  Program control may be resumed at the next statement with a [[GosubReturn|Return]] statement in the subroutine.  Error traps are kept in a stack so that the last defined trap, that has not been removed with an [[offerror|OffError]] will be the active one. 
- 
-You may not execute an OnError statement inside a [[Try|Try / Catch / End Try]] statement. 
- 
-==== Example ==== 
- 
-See example of usage on [[Errorcodes|Error Codes]] and [[ThrowError|ThrowError]] pages. 
- 
-==== See Also ==== 
-{{page>en:start#Error Handling&noheader}} 
- 
-==== History ====  
-|0.9.6z|New To Version| 
-|1.99.99.33|Removed the ability to use a subroutine for error trapping| 
  
en/onerror.txt ยท Last modified: 2020/02/28 10:46 (external edit)