Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
Inventory Manager For Dynamics CRM 4.0
Dockit Migrator for SharePoint 11.8.6905
Australia Post Shipping For Magento 2 1.0.0
StarTrack Shipping For Magento 2 2.0.0
Mydala script 1.3
dotConnect for FreshBooks 1.8
Odoo Kingfisher Theme 1.0
Bitcoin Mining Software - Bitcoin Mining Script 1.0.2
Excel Add-in for Magento 1.7
Excel Add-in for MailChimp 1.7
Devart Excel Add-in for QuickBooks 1.7
Excel Add-in for PostgreSQL 1.7
Devart Excel Add-in for MySQL 1.7
Devart Excel Add-in for NetSuite 1.7
Excel Add-in for Salesforce 1.7
Top Code
ATN Site Builder 3.0
ATN Resume Finder 2.0
PHP Review Script 1.0
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
SecureBridge 8.0
dotConnect for SQLite 5.9
Database Workbench Pro 5.6.10.0
Excel Add-in for PostgreSQL 1.1
EntityDAC 1.6
Excel Add-in for Salesforce 1.1
Excel Add-in for MailChimp 1.1
Aglowsoft SQL Query Tools 8.2
Classified Ad Lister 1.0
Solid File System OS edition 5.1
Top Rated
phpEnter 5.1.
Single Leg MLM 1.2.1
Azizi search engine script PHP 4.1.10
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
Deals and Discounts Website Script 1.0.2
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
handleError - generic error-handling function 1.0
File ID: 80529






handleError - generic error-handling function 1.0
Download handleError - generic error-handling function 1.0http://www.mathworks.comReport Error Link
License: Freeware
File Size: 10.0 KB
Downloads: 2
Submit Rating:
handleError - generic error-handling function 1.0 Description
Description: handleError is a general-purpose error-handling function. The user can register cleanup actions that will automatically be activated in case of error. If an error occurred and handleError is called, then a hyper-linked stack-trace is displayed in the command window.

Syntax:
ERRMSG = handleError
ACTIONIDX = handleError('register',ACTION)
ERRMSG = handleError('unregister',ACTIONIDX)

ACTIONIDX = handleError('register',ACTION) will register cleanup actions to be performed in case of error. ACTION may be a single string (e.g., 'msgbox(lasterr)') or a cell array with arguments for the sprintf function (e.g., {'set(%.19g,''Pointer'',''arrow'')',gcf}). The returned ACTIONIDX is the sequential cleanup action index.

ERRMSG = handleError('unregister',ACTIONIDX) will perform and unregister cleanup action(s) ACTIONIDX. The returned ERRMSG is the last error msg.

ERRMSG = handleError; will automatically perform and unregister any registered cleanup actions. Then, the last error message will be displayed in the Command Window, followed by a hyper-linked stack trace of that error. This format is the one that should be used within catch blocks (see Example):

Example:
try
. cleanups(1)=handleError('register',{'set(%.19g,''Pointer'',''arrow'')',gcf});
. cleanups(2)=handleError('register','disp(''finished processing!'')');
. set(gcf,'Pointer','watch'); drawnow;
. ... some complex computation ...
. handleError('unregister',cleanups); %eval & unregister cleanup actions
catch
. handleError; %display error stack; eval & unregister cleanup actions
end

Compatibility:
Created on Matlab 7, but should work on earlier versions too. Please report any issues to altmany (at) gmail dot com.

License: Freeware

Related: Format, catch, blocks, exampleexampletry, Trace, stack, registered, unregister, perform, Message, Command, Window, cleanups dhandleerror register disp finished, Processing, Versions

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 10.0 KB

Downloads: 2



More Similar Code

ASP.NET and VB.NET Error Handling is a tutorial which deals with the error handing methods in ASP.NET and VB.NET. The author explains about how to use the structured way of error handling with the help of Try & Catch statement in VB.NET. In ASP.NET finding the runtime errors is easy and author explains about how to handle them. With this type the users could display customized messages to the clients instead of showing the error messages....



This plugin was intended for developers who need to view errors generated by PHP. It sets an error handling function, but makes no attempt to alter other default conditions and reporting conditions within PHP. It is capable of reporting any error...



This plugin was intended for developers who need to view errors generated by PHP. It sets an error handling function, but makes no attempt to alter other default conditions and reporting conditions within PHP. It is capable of reporting any error...



LS-ERROR: Minimal Error Handling for Lotus Script



Generic "approximately equal" function for any object type, with customisable error tolerance.

When called with float arguments, approx_equal(x, y[, tol[, rel]) compares x and y numerically, and returns True if y is within...



Website error handling addon (DisErrors) is a php-nuke module which let you customize HTTP error pages (such as 400 error, 401 error, 404 error etc.). The script will also match your phpnuke theme design since it is coded as a module. It has an...



MySQL Manager is based on PHP MVC (Model-View-Controller) framework.

The framework provides easy error handling, automatic update, create, delete querys, easy objects and classes management.

The framework enables easy web...



A very basic error handling class for use in your code.



Error handling is easier in ASP.NET which is proved through this tutorial. The author explains about using Visual C# .NET code to find and handle the runtime errors occuring in ASP.NET. Through this article the users could understand about...



This is one of the ASP based error handling article through which you will be able to know the resources that forms the errors while loading ASP files using Internet Information Server (IIS). Explains that user permission levels may cause the...

User Review for handleError - generic error-handling function
- required fields
     

Please enter text on the image