Lasso Soft Inc. > Home

[ Fail ]

Method

[Fail] halts execution of the current page or [Protect] code block.

Takes three parameters in combinations as shown in the syntax specification: an integer error code, a string error message and a reported stack.

If no stack is specified the default error stack is returned.

  • Syntax
Fail(Error Code, 'Error Message')

Fail(Error Code, 'Error Message', 'stack')

Fail('Error Message')
Examples
  • Beginner

To report a fatal error and stop processing the current format file:

Use the [Fail] method. Lasso will immediately halt processing of the current page or [Protect] code block and report the error to the user or run any [Handle] method that is present.

Code

Fail( -1, 'Unknown Rhino!')

Result

FAILURE: -1 Unknown Rhino!
1:1 adminapp_lasso_runner_thread
11:18 zip:Admin:/_init.admin.lasso
9:4 zip:Admin:/_init.admin.lasso
25:39 zip:Admin:/quickcode.form[xhr].lasso
182:2 error.lasso
182:2 error.lasso
176:2 error.lasso
175:2 error.lasso
8:3 zip:Admin:/_init.admin.lasso
25:39 zip:Admin:/quickcode.form[xhr].lasso
22:2 zip:Admin:/quickcode.form[xhr].lasso
18:5 zip:Admin:/quickcode.form[xhr].lasso
182:2 error.lasso
182:2 error.lasso
176:2 error.lasso
175:2 error.lasso
21:1 zip:Admin:/quickcode.form[xhr].lasso
79:10 lassoapp.lasso
609:14 lassoapp.lasso
608:2 lassoapp.lasso
607:32 lassoapp.lasso
76:2 lassoapp.lasso
93:17 web_response.lasso
112:13 web_response.lasso
103:4 web_response.lasso
100:4 web_response.lasso
100:4 web_response.lasso
212:19 web_response.lasso
182:2 error.lasso
182:2 error.lasso
176:2 error.lasso
175:2 error.lasso
99:3 web_response.lasso
212:19 web_response.lasso
202:3 web_response.lasso
200:3 web_response.lasso
604:17 web.lasso
182:2 error.lasso
182:2 error.lasso
176:2 error.lasso
175:2 error.lasso
603:2 web.lasso
256:16 fastcgi.lasso
252:3 fastcgi.lasso
248:2 fastcgi.lasso
182:2 error.lasso
182:2 error.lasso
176:2 error.lasso
175:2 error.lasso
250:2 fastcgi.lasso
248:2 fastcgi.lasso
499:37 fastcgi.lasso
499:37 fastcgi.lasso

Recent Comments

No Comments found

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft