handleError Matlab script

SPONSORED LINKS

    Specification

  • Version:
  • File size: 0 KB
  • File name: handleError.m
  • Last update:
  • Platform: Windows / Linux / Mac OS / BSD / Solaris
  • Language: Matlab
  • Price:Freeware
  • Company: Yair Altman (View more)

handleError script description:



handleError is a Matlab script for Development Tools scripts design by Yair Altman. It runs on following operating system: Windows / Linux / Mac OS / BSD / Solaris.
handleError - A general-purpose error-handling function with an ability to register automatic cleanup actions

Publisher review:
handleError - A general-purpose error-handling function with an ability to register automatic cleanup actions 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 = handleErrorACTIONIDX = 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 actionscatch. handleError; %display error stack; eval & unregister cleanup actionsendCompatibility:Created on Matlab 7, but should work on earlier versions too. Requirements: ยท MATLAB Release: R14SP3
Operating system:
Windows / Linux / Mac OS / BSD / Solaris

Related script downloads:

Latest script and internet news

IE 10 for Windows 8, comes with Adobe Flash support

IE 10 for Windows 8, comes with Adobe Flash support

After criticism received at Metro version of Internet Explorer 10 , initially offered no support for Adobe Flash technology, Microsoft has taken measures to correct this problem by working directly with Adobe to integrate the necessary components into the

Posted on: 25 May 2012 10:36 by A. Brown

Windows 8: boot to fast to furious

Windows 8: boot to fast to furious

Last year began to circulate on the Internet videos where Windows 8 systems boot in 7 seconds. Unfortunately, from this performance derives some problems.

Posted on: 25 May 2012 07:28 by A. Brown

Apple prepares iPhone 5 and iOS 6

Apple prepares iPhone 5 and iOS 6

New information coming from some sources close to Apple confirming that the Cupertino giant is testing two different models of iPhone, called internal iPhone5, 1 and iPhone 5.2. Apparently, both devices have a screen of 3.95 inches and a resolution of 113

Posted on: 24 May 2012 08:36 by A. Brown

Windows 8 estimates: 500 million users in 2013

Windows 8 estimates: 500 million users in 2013

Microsoft expects to launch a new wave of optimism with Windows 8. In a recent statement, Steve Ballmer, chief executive at Microsoft, estimates that Windows 8 will reach a total of about 500 million users by the end of 2013.

Posted on: 24 May 2012 08:25 by A. Brown

SPREAD THE WORD

User Rating

handleError
Rating: 2.0 out of 5
Based on 1 ratings. 1 user reviews.

  • Currently 2.00 out of 5
  • 1
  • 2
  • 3
  • 4
  • 5