Path: news.mathworks.com!not-for-mail
From: "Darik " <dgambleDEL@uwaterlooDEL.caDEL>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Error lands in debugger instead?
Date: Tue, 9 Oct 2007 16:21:08 +0000 (UTC)
Organization: Waterloo
Lines: 27
Message-ID: <feg9pk$95b$1@fred.mathworks.com>
References: <feg1fq$ptf$1@fred.mathworks.com> <feg29n$ag6$1@fred.mathworks.com>
Reply-To: "Darik " <dgambleDEL@uwaterlooDEL.caDEL>
NNTP-Posting-Host: webapp-06-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1191946868 9387 172.30.248.36 (9 Oct 2007 16:21:08 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 9 Oct 2007 16:21:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 895526
Xref: news.mathworks.com comp.soft-sys.matlab:432031



"Steven Lord" <slord@mathworks.com> wrote in message 
<feg29n$ag6$1@fred.mathworks.com>...
> 
>DBSTOP IF ERROR
>
>SNIP

What about something like this:

h = figure;
prop = schema.prop(h, 'MyProp', 'mxArray');
prop.SetFunction = @mySetFunction;
set(h, 'MyProp', 'test')


function val = mySetFunction (h, evt, val)

%code culminating in error
error ('mySetFunction', 'Error occurred setting property 
MyProp')


Using dbstop if error will result in the debugger stopping 
at the SET command, not at the line in the set function 
causing the error. Does anyone know if there's a way to 
have the debugger stop in the set function?