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
GetOrgChart 2.5.3
AnyGantt JS Gantt Charts 8.6.0
AnyChart JS Charts and Dashboards 8.6.0
Multi Vendor Ecommerce Script & Apps 4.0
Magento 2 Inventory Management Extension 1.0
Yipit Clone Script - Daily Deals Software 1.0.2
Devart Excel Add-in for Oracle 1.7
Devart Excel Add-in for Freshdesk 1.7
Devart Excel Add-in for G Suite 1.7
C# QR Code Generator 4.0.2.2
Salesforce WordPress Customer Portal 3.2.0
Single Leg MLM 1.2.1
OzGIS 14.6
Quick Maps For Dynamics CRM 3.1
Job Board Software 4.2
Top Code
MCU 8051 IDE 1.4.7
School Management Script 1.0.4
shopping mall management system 1.0
WinPoker 2.02
SynaSer Serial Port Library 5.0
MLM Software 1.0.2
Planyo online reservation system module 6.x-1.8
SuperGeek Free Document OCR 2.5.6
sipmethod 1.0
School Management CRM 1
STDF file reader 1.0
Farnsworth 1.0
WebKit2.NET 0.10
Simple IP Calculator sub/sup networking 0.0.4
Beremiz 1.0
Top Rated
VisualNEO Web 2018.12.15
Paste phpSoftPro 1.4.1
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
Availability Booking Calendar PHP 1.0
PHP GZ Blog Script 1.1
ATN Jobs Software 4.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