Code covered by the BSD License  

Highlights from
invoerr

Be the first to rate this file! 2 Downloads (last 30 days) File Size: 2.21 KB File ID: #29007
image thumbnail

invoerr

by Adam Leadbetter

 

12 Oct 2010

Improved invocation error reporting for Matlab functions

| Watch this File

File Information
Description

At the Matlab Conference, 2010 in London, Joe Hicklin commented that he was interested in seeing improved invocation error reporting in Matlab functions, so here's my stab at providing some of that ability.

The function takes:
  - a string of the calling function's name
  - an integer of which argument the error is in
  - cell arrays of strings with pairs of argument name and argument types

e.g. invoerr('foo',2,{'bar','int'},{'baz','str'})

creates an error report thus:

      Error in function foo at argument 2 (baz):

foo(bar,baz)

e.g. foo(1,'a character string')

MATLAB release MATLAB 7.9 (2009b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
error reporting Adam Leadbetter 12 Oct 2010 11:51:35

Contact us at files@mathworks.com