Lasso Soft Inc. > Home

[error_reset]

Linkerror_reset
AuthorJason Huck
CategoryError
Version8.x
Licensehttp://opensource.org/licenses/artistic-license.php
Posted29 Nov 2006
Updated29 Nov 2006
More by this author...

Description

Called without parameters, this tag clears any previously set error code and/or message, setting it back to the default of 0:No error. Or, you can provide the error code and message you wish to use as params to the tag.

Sample Usage

error_code + ': ' + error_msg + '
\n'; error_reset(-9953, 'Unknown error.'); error_code + ': ' + error_msg + '
\n'; error_reset; error_code + ': ' + error_msg + '
\n'; error_reset(5000, 'Custom error.'); error_code + ': ' + error_msg + '
\n'; error_reset(-9953); error_code + ': ' + error_msg + '
\n';

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.

define_tag(
	'reset',
	-namespace='error_',
	-opt='code', -type='integer',
	-opt='msg', -type='string',
	-priority='replace',
	-description='Resets the current error message/code.'
);
	!local_defined('code') ? local('code') = error_noerror( -errorcode);		
	error_msg = '';
	error_seterrorcode(#code);		
	!local_defined('msg') ? local('msg') = error_msg;
	error_seterrormessage(#msg);
/define_tag;

Comments

No comments

Please log in to comment

Subscribe to the LassoTalk mail list

LassoSoft Inc. > Home

 

 

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