Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: "Error using ==> dbstop"
Date: Mon, 29 Jun 2009 20:31:01 +0000 (UTC)
Organization: Universit&#228;tsSpital Z&#252;rich
Lines: 42
Message-ID: <h2b8a5$cl5$1@fred.mathworks.com>
References: <h1vvp9$e75$1@fred.mathworks.com> <4a659c20-07f7-421f-b010-1d7aca2078f6@j19g2000vbp.googlegroups.com> <h29n1b$51j$1@fred.mathworks.com> <h29ubm$kfs$1@fred.mathworks.com> <h2a5po$amq$1@fred.mathworks.com> <MPG.24b27338f102bf719899f2@news.mathworks.com> <h2b74l$n7f$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1246307461 12965 172.30.248.37 (29 Jun 2009 20:31:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 29 Jun 2009 20:31:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 11
Xref: news.mathworks.com comp.soft-sys.matlab:551526


"Matthew Simoneau" <matthew@mathworks.com> wrote in message <h2b74l$n7f$1@fred.mathworks.com>...
> Publishing uses conditional breakpoints to instrument the file being published.  That's where these DBSTOP messages are coming from.  I don't know why you're seeing this error, though.  What version of MATLAB are you running?

as the OP said:
> Hi us,
> thank you for your fast reply. 
> - MLINT does not find any errors.
> - CATCHERROR=true
> - I use MATLAB 7.8.0 (R2009a)     % <- the version info

please note that the modified code i submitted (apparently) works without errors...
however, if the code is modified to

function r=etest()
     mFile='test.m';
     opts.outputDir='.';
     opts.catchError=true;
     lasterror('reset');
try
     publish(mFile,opts);
catch msg
     error(msg.message);
end
     r=lasterror;
end

% and run as
     r=etest;
% it still does NOT error out - but LASTERROR is set (?!), and the info is

     [{r.stack.line}',{r.stack.name}.',{r.stack.file}.']
%{
% note: nice formatting is off (see in ori view)...
274           findLandingLine       codetools\private\evalmxdom.m
 98 setConditionalBreakpoints       codetools\private\evalmxdom.m
 48          instrumentAndRun       codetools\private\evalmxdom.m
 19                 evalmxdom       codetools\private\evalmxdom.m
149                   publish                 codetools\publish.m
  7                     etest etest.m
%}

us