Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: "Error using ==> dbstop"
Date: Mon, 29 Jun 2009 10:42:00 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 59
Message-ID: <h2a5po$amq$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>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1246272120 10970 172.30.248.38 (29 Jun 2009 10:42:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 29 Jun 2009 10:42:00 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1887645
Xref: news.mathworks.com comp.soft-sys.matlab:551345


> a few thoughts (only)
> - did you recently edit one of the files...
> - did you MLINT your files to look for (minute) errors, eg, END/RETURN mismatches...
> - how do you set the CATCHERROR option in publish...
> - which ML version do you use...

Hi us,
thank you for your fast reply. 
- MLINT does not find any errors.
- CATCHERROR=true
- I use MATLAB 7.8.0 (R2009a)

I created a simple example that will throw the error. I have no idea why the example below won't work!!!

1) the code I want to test:

function test()
a=1;
b=2;
fprintf('a+b=%d\n',a+b)
end

2) my evaluation code:

function evaluateTest()
clear all,close all,clc;
mFile='test.m'
opts.outputDir = fullfile('.');
opts.catchError=true
[MLINTinfo]=mlint(mFile)
publish(mFile, opts);
checkErrors=lasterror;
message = checkErrors.message
if(~isempty(message))
    fprintf('\nThere is an ERROR!\n');
end

3) evaluateTest() produces following output:

mFile =
test.m
opts = 
     outputDir: '.'
    catchError: 1
MLINTinfo = 
0x0 struct array with fields:
    message
    line
    column
message =
Error using ==> dbstop
You can not set a breakpoint past the start of the last
expression in the file.

There is an ERROR!


Best regards,
Martin