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 21:08:41 +0000 (UTC)
Organization: Waterloo
Lines: 28
Message-ID: <fegqkp$9r9$1@fred.mathworks.com>
References: <feg1fq$ptf$1@fred.mathworks.com> <feg29n$ag6$1@fred.mathworks.com> <feg9pk$95b$1@fred.mathworks.com> <fegdna$aeu$1@canopus.cc.umanitoba.ca> <feghi8$mnu$1@fred.mathworks.com> <feginv$gp1$1@fred.mathworks.com> <feglkj$st2$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 1191964121 10089 172.30.248.36 (9 Oct 2007 21:08:41 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 9 Oct 2007 21:08:41 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 895526
Xref: news.mathworks.com comp.soft-sys.matlab:432093



"Yair Altman" <altmanyDEL@gmailDEL.comDEL> wrote in message 
<feglkj$st2$1@fred.mathworks.com>...
> 
> Schema.prop handlers only receive the object handle and
> suggested value as their first 2 args - no evt field. They
> also have a generic try-catch mechanism that causes errors
> to propagate upward to their caller (=your set call), 
which
> is why you dbstop there. You can trick this by having your
> own error-handling code segment, as follows:
> 
> function val = mySetFunction (h, val)
>   try
>     % do something
>   catch
>     err = lasterror;
>     keyboard;  % inspect err struct here
>   end
> 
> SNIP 

That'll work! 

I was just writing the example set function from memory, 
which is why I messed up the function header. I've actually 
learned everything I know about schema.prop objects from 
your various posts here on the CSSM, so consider this my 
much overdue thanks.