f



How do I exclude "CTRL+C" from "dbstop if error"?

Hello,

I am using extensively the "dbstop if error" option to allow me to debug in case of unexpected error (aren't they all...?).
However, I don't want to go into debug mode when I break execution using "CTRL+C". I don't want to go into debug mode in this case. Can that be done? can I exclude a specific error ("Operation terminated by user during...") from the "dbstop if error" mode?

Thanks,
Ran
0
rans8a (2)
7/19/2012 8:34:29 AM
comp.soft-sys.matlab 211266 articles. 17 followers. lunamoonmoon (258) is leader. Post Follow

5 Replies
808 Views

Similar Articles

[PageSpeed] 31

"Ran" wrote in message <ju8gqk$ncn$1@newscl01ah.mathworks.com>...
> Hello,
> 
> I am using extensively the "dbstop if error" option to allow me to debug in case of unexpected error (aren't they all...?).
> However, I don't want to go into debug mode when I break execution using "CTRL+C". I don't want to go into debug mode in this case. Can that be done? can I exclude a specific error ("Operation terminated by user during...") from the "dbstop if error" mode?
> 
> Thanks,
> Ran

I am curious about this as well. Maybe dbclear will do the trick?
0
kholmbeck (63)
7/27/2012 5:04:20 AM
"Ran" wrote in message <ju8gqk$ncn$1@newscl01ah.mathworks.com>...
> Hello,
> 
> I am using extensively the "dbstop if error" option to allow me to debug in case of unexpected error (aren't they all...?).
> However, I don't want to go into debug mode when I break execution using "CTRL+C". I don't want to go into debug mode in this case. Can that be done? can I exclude a specific error ("Operation terminated by user during...") from the "dbstop if error" mode?
===============

I don't think there's a way to exclude specific kinds of errors, but unlike DBSTOP, the "Stop if Errors/Warnings" dialog gui under the editor's Debug menu let's you specify a list of error identifiers that will trigger debug mode. Maybe if you list the common ones (e.g. dimension mismatch errors) that will be almost as good as what you're looking for.

Personally, though, I think the effort of typing dbquit after a ctrl+C abort is pretty minimal.
0
mattjacREMOVE (3196)
7/27/2012 12:37:13 PM
"Matt J" wrote in message <juu21p$rq9$1@newscl01ah.mathworks.com>...
> "Ran" wrote in message <ju8gqk$ncn$1@newscl01ah.mathworks.com>...
> > Hello,
> > 
> > I am using extensively the "dbstop if error" option to allow me to debug in case of unexpected error (aren't they all...?).
> > However, I don't want to go into debug mode when I break execution using "CTRL+C". I don't want to go into debug mode in this case. Can that be done? can I exclude a specific error ("Operation terminated by user during...") from the "dbstop if error" mode?
> ===============
> 
> I don't think there's a way to exclude specific kinds of errors, but unlike DBSTOP, the "Stop if Errors/Warnings" dialog gui under the editor's Debug menu let's you specify a list of error identifiers that will trigger debug mode. Maybe if you list the common ones (e.g. dimension mismatch errors) that will be almost as good as what you're looking for.
> 
> Personally, though, I think the effort of typing dbquit after a ctrl+C abort is pretty minimal.

I happen to use CTRL+C a lot, and every time I have to quit debug mode and close the "ind2sub" file or something irrelevant like this that was opened automatically because of the "dbstop if error" condition.
I do very much need the "dbstop if error" for real errors, however.
If there is no option to exclude some errors from the condition, where can I find the list of all possible errors so I can enter them manually one-by-one?

Thanks,
Ran
0
rans8a (2)
7/28/2012 11:45:14 AM
"Ran" wrote in message <jv0jca$bn9$1@newscl01ah.mathworks.com>...
>
> If there is no option to exclude some errors from the condition, where can I find the list of all possible errors so I can enter them manually one-by-one?
============

There's no master list. As you encounter different errors, you can use the LASTERROR command to find the identifier of the last error issued and then add it to the list. To get the list started, you can obviously engineer some of the common ones deliberately from the command line, e.g.,


>> A=eye(3); A(1,5);
Attempted to access A(1,5); index out of bounds because size(A)=[3,3].
 
>> s=lasterror; s.identifier

ans =

MATLAB:badsubscript

>> A(:,1)=A
Subscripted assignment dimension mismatch.
 
>> s=lasterror; s.identifier

ans =

MATLAB:subsassigndimmismatch
0
mattjacREMOVE (3196)
7/28/2012 12:07:10 PM
Looks like I was wrong. The GUI doesn't let you enter a list. It forces you to add breakpoint identifiers one by one.  In that case, it's probably better to write your own mfile, which just calls dbstop repeatedly on the error types that interest you


function mystops


dbstop if error ID1
dbstop if error ID2
dbstop if error ID3
etc...

end
0
mattjacREMOVE (3196)
7/28/2012 12:25:13 PM
Reply:

Similar Artilces:

why "::", not "."
Why does the method of modules use a dot, and the constants a double colon? e.g. Math::PI and Math.cos -- Posted via http://www.ruby-forum.com/. On Oct 26, 2010, at 01:48 , Oleg Igor wrote: > Why does the method of modules use a dot, and the constants a double > colon? > e.g. > Math::PI and Math.cos For the same reason why inner-classes/modules use double colon, because = they're constants and that's how you look up via constant namespace. Math::PI and ActiveRecord::Base are the same type of lookup... it is = just that Base is a module and PI is a float....

about "++" and "--"
why this program snippet display "8,7,7,8,-7,-8" the program is: main() { int i=8; printf("%d\n%d\n%d\n%d\n%d\n%d\n",++i,--i,i++,i--,-i++,-i--); } > why this program snippet display "8,7,7,8,-7,-8" Ask your compiler-vendor because this result is IMHO implementation-defined. Check this out: http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.15 http://www.parashift.com/c++-faq-lite/misc-technical-issues.html#faq-39.16 Regards, Irina Marudina fxc123@gmail.com wrote: > why this program snippet display "8,7,7,8,-7,-8&q...

"out" and "in out"
Hi i found the following explaination: In Ada, "in" parameters are similar to C++ const parameters. They are effectively read-only within the scope of the called subprogram. Ada "in out" parameters have a reliable initial value (that passed in from the calling subprogram) and may be modified within the scope of the called procedure. Ada "out" parameters have no reliable initial value, but are expected to be assigned a value within the called procedure. What does "have no reliable initial value" mean when considering the "out" parameter? By chance I created a small program as follows: =========== s : string := "CAT"; procedure modify ( s1 : out string ) is begin s1(2) := 'U'; end modify; ... put ( modify(s) ); =========== now I get as a result "CUT", and i dont understand why i get this result. Doesnt the "out" specify that its initial value isnt passed in via the parameter? But it seems to be passed in the above. In fact the "out" is acting like an "in out". I am a little confused. Could someone shed some light on this? Many thanks! zork "zork" <zork@nospam.com> wrote in message news:4104d5de@dnews.tpgi.com.au... > Hi i found the following explaination: > > In Ada, "in" parameters are similar to C++ const parameters. They are > effectively read-only within the scope of the called subprogram. > Ada "in out&q...

Urgent need """""""""""INFORMATICA DEVELOPER"""""""""""""
Hello Partners, How are you ? Please find the requirements below. Title: Database/ETL Developer Duration: 6 months Location: NY Exp: 7+ Locals preferred Database/ETL requirements (Mandatory) Candidate must have worked with financial instruments, preferably Mutual Funds but, Equities are also ok. PL/SQL - packages, Stored procs, Functions, Aggregate functions, Pipelined Functions Informatica 8.6 - especially complex mappings, complex maplets, complex workflows, transformations Oracle 10g/11g Unix/Linux shell scripting Database/ETL requirements (Optional) Data warehousing experience Threading and job concepts in 10g/11g Cost based Optimizer concepts in 10g/11g Must : Experience with XML files and partitioning concepts in Oracle, Collections, Material Views Note : No phone calls please. : send Resumes to karthik@bhaninfo.com Thanks & Regards Karthik BhanInfo karthik@bhaninfo.com ...

["a", "b", "c", "d"] to "a, b, c, d"?
I want to process each element of an array, but the last element should be handled special. Here is an example: def p_ary(ary) str = "" ary.each do |elem| str << elem << ", " end str.chomp!(", ") str end so p_ary(["a", "f", "x", "test"]) produces "a, f, x, test". The code works, but isn't there an easier and more general way for this behaviour? martinus On Tue, 06 Apr 2004 04:23:22 -0700, Martin wrote: > I want to process each element of an array, but the last ele...

"In" "Out" and "Trash"
I just bought a new computer and I re-installed Eudora Light on my new computer. But when I open Eudora, the "In", "Out" and "Trash" links are not on the left side of the screen the way they were on my old computer. How can I get these links back on the left side of the screen? Thank you. On 25 Mar 2007 09:49:22 -0700, "abx" <abfunex@yahoo.com> wrote: >I just bought a new computer and I re-installed Eudora Light on my new >computer. But when I open Eudora, the "In", "Out" and "Trash" links >are ...

Urgent JAVA Requirement in """"""NEW YORK"""""""""
Hello Partners, How are you ? Please find the requirement below. Location : NY Duration : 8 mnths Rate :Open Job description: Java/J2EE Web Service Developer =B7 (4+ years of application development experience in Java/J2EE and Web service technologies. =B7 Experience with spring & Hibernate. =B7 Experience with J2EE Application Server (preferably Web logic). =B7 Preferable Aqua logic DSP Experience =B7 Preferable Sonic ESB Composite Service experience Experience working in UNIX environment. Good working knowledge of Oracle RDBMS and PL/SQL) Note : Please send your updated resume along with contact no to Karthik@bhaninfo.com. Thanks & Regards Karthik BhanInfo karthik@bhaninfo.com # 1572, 7 th Floor Suites, 1 Blue Hill Plaza Pearl River,NY-10965 www.bhaninfo.com ...

Question about "sprintf" "@" "do for"
Hello, this works: A1=3D1 A2=3D2 A3=3D3 i=3D1 vari=3Dsprintf("A%.f",i) print vari,"=3D",@vari i=3Di+1 vari=3Dsprintf("A%.f",i) print vari,"=3D",@vari i=3Di+1 vari=3Dsprintf("A%.f",i) print vari,"=3D",@vari do for [i=3D1:3]{ vari=3Dsprintf("A%.f",i) print vari } But I want to have "print vari,"=3D",@vari" in the loop. But it dosen't=20 work. Why can't I use "print vari,"=3D",@vari" in the loop? Is there a=20 solution for? J=C3=B6rg Jörg ...

puts "\\".gsub("\\", "\\\\")
Hello, I have a mini-ruby quiz. Guess what this line of code writes to the console, then try it for yourself: puts "\\".gsub("\\", "\\\\") Why is that so? Martin From: martinus [mailto:martin.ankerl@gmail.com]=20 # Hello, I have a mini-ruby quiz. Guess what this line of code writes to # the console, then try it for yourself: # puts "\\".gsub("\\", "\\\\") puts "\\".gsub("\\", "\\\\") \ #=3D> nil # Why is that so? faq. escaping the escape in sub/gsub. search the archives. maybe you want somethin...

Gary Sokolich """"""
"""""""""" http://www.manta.com/c/mmlq5dm/w-gary-sokolich W Gary Sokolich 801 Kings Road Newport Beach, CA 92663-5715 (949) 650-5379 http://www.tbpe.state.tx.us/da/da022808.htm TEXAS BOARD OF PROFESSIONAL ENGINEERS February 28, 2008 Board Meeting Disciplinary Actions W. Gary Sokolich , Newport Beach, California �V File B-29812 - It was alleged that Dr. Sokolich unlawfully offered or attempted to practice engineering in Texas (...) Dr. Sokolich chose to end the proceedings by signing a Consent Order that was accepted by ...

MAC SE: "Bomb" "Sys Error" / Address error" at start
Stephen Buggie (505) 863-2390 Psychology Department Univ. of New Mexico, Gallup February 15, 2006 200 College Road Gallup NM 87301 buggie@unm.edu NEED RESCUE DISK! MAC SE -- BOMB System Error / Address Error ------------------------------------------------------------------------------------------------ Dear Macintosh experts, My Mac SE crashes at power-up. I gives the bell-chime, then it proceeds though the launch sequence. After showing two extension-icons, it crashes. Then a dialogue-box shows the BOMB icon with the message, SORRY, A SYSTEM ERROR HAS OCCURRED --- ADDRESS ERROR It never reaches the desktop; this crash occurs every time. The Mac SE has a 330 meg internal hard drive, System 6.x.x, and a 1.4 meg internal 3.5 floppy drive. There is a SCSI port but no internal CD reader. The b/w screen is extremely sharp in its focus. The computer worked fine until about a year ago, when I stupidly put a file in the wrong folder. It has crashed consistently ever since! It has an assortment of software on the hard drive, but I have backups of everything and am willing to reformat the entire hard drive if necessary to get the computer working again! If I can resurrect the computer, I hope to upgrade the system to System 7.0 or 7.1 . DONE SO FAR: Yes, I have launched it with shift-key down, to turn off the extensions, but it always crashes Ive also tried vari...

"A" is not equal "A"?
I was trying to convert String Array to String A through cycle and than compare the result with String B but eventhough results were the same it returned false. I'am working in BlueJ 3.1.0 Code is: public boolean Method () { String[] Example = {"a","b","c"}; String A = ""; String B = "abc" for (int i = 0; i<3 ; i++) { A = A + Example[i]; } if (A == B) { return true; } } never got true... I appreciate any suggestions how to solve this Den 08.04.2014 10:06, skrev 245dav@gmail.com:...

what does the "+" and the "-" mean?
I recently read what the "+" and the "-" signs mean for compact discs. Of course, a friend has just asked me and I now forget. I've searched all over the place with no results. Anyone know? TIA! .. -------------------------------------- Mike Richter, were you born with "Scam Artist" emblazoned on your face? -------------------------------------- roscoe james wrote: > > I recently read what the "+" and the "-" signs mean for compact discs. Of > course, a friend h...

why have both "." and "->" ?
I used to remember why c++ needed both ? Could somebody help me here ? For example class A{ f(); }; A* aa; You could do either "aa->f()" or "(*aa).f()". So why does C++ need both operators. Raj "raj" <rajkumar@hotmail.com> schreef in bericht news:d7fee6d0.0406230748.694b966b@posting.google.com... > I used to remember why c++ needed both ? > Could somebody help me here ? > > For example > > class A{ > f(); > }; > > A* aa; > > You could do either "aa->f()" or "(*aa).f()". So why does C++ need both operators. > > Raj There is a difference I believe that xxxx->yyyy is used if xxxx is a pointer to an object/class and xxxx.yyyyy if xxxx is the object/classs > class A{ > f(); > }; > > A* aa; > > You could do either "aa->f()" or "(*aa).f()". So why does C++ need both operators. IMHO it's simply convenience. Bye, Marco raj wrote: > > You could do either "aa->f()" or "(*aa).f()". So why does C++ need both > operators. The second form involves more typing and requires more effort to read. -- Russell Hanneken eunaarxra@cbobk.pbz Use ROT13 to decode my email address. In message <WOhCc.15115$Wr.8451@newsread1.news.pas.earthlink.net>, Russell Hanneken <me@privacy.net> writes >raj wrote: >> >> You could do either "aa->f()" or "(*aa...

"==" is NOT TRUE "==", WHY?
[CODE START] x=5; y=8; if (x + y + 1E-15 == 13) a = 3 else a = 8 end [CODE END] When x + y + 1E-15, the code above returns a = 8. When x + y + 1E-16, the code above returns a = 3. Why? Kindly advise. Thanks. "onemilimeter Chen" <onemm@example.com> wrote in message <g7adrj$5tr$1@fred.mathworks.com>... > [CODE START] > x=5; > y=8; > if (x + y + 1E-15 == 13) > a = 3 > else > a = 8 > end > [CODE END] > > When x + y + 1E-15, the code above returns a = 8. > When x + y + 1E-16, the code above returns a = 3. > > Why? ...

how to change "/" to "\"
iam new to shell scripting and i have plz can anyone help in changing the pattrern "/" to "\" using the sed command. olympie@gmail.com wrote: > iam new to shell scripting and i have plz can anyone help in changing > the pattrern "/" to "\" using the sed command. sed 's/\//\\/g' will replace all '/' with '\' srp -- http://saju.net.in Saju Pillai <saju.pillai@gmail.com> wrote: >> iam new to shell scripting and i have plz can anyone help in changing >> the pattrern "/" to "\" using ...

Re: "out" and "in out"
"no reliable initial value" means, you cannot rely on the value, but it may have a value. This depends on the parameter passing mechanism, which is _not_ related to the parameter mode (contrary to what many people think). So the parameter mode is there (nearly) solely for the information of the reader. The parameter passing mechanism for all kinds of parameters is defined in the RM. There are parameters passed by copy (in and out), by reference; for some it is explicitly left undefined. In your case, the passing mechanism is by reference, so you get what you get. But don't rely on this, rely only on the mode, i.e. the parameter st is undefined upon entering the procedure modify, so when you only write component 2, upon return, only component 2 has been written. Under slight variations, the result of your code might be <garbage character>U<garbage character>. Another thing: Don't rely upon s1'First = 1. Component 2 might not exist. You could call modify like so: X: String (25..30); modify (X); Now s1(2) inevitably will raise Constraint_Error. ____________________________________________________ Aufnehmen, abschicken, nah sein - So einfach ist WEB.DE Video-Mail: http://freemail.web.de/?mc=021200 "Christoph Karl Walter Grein" <AdaMagica@web.de> wrote: > > In your case, the passing mechanism is by reference, so you get what you get. But don't rely on this, rely only on the mode, i.e. the parameter st is undefined...

Does Python have equivalent to MATLAB "varargin", "varargout", "nargin", "nargout"?
Thank you in advance for your response. Dmitrey openopt@ukr.net writes: > Thank you in advance for your response. And those do ... ? -- Jorge Godoy <jgodoy@gmail.com> Where you would use varargin and nargin in Matlab, you would use the *args mechanism in Python. Try calling def t1(*args): print args print len(args) with different argument lists Where you would use varargout and nargout in Matlab you would use tuple unpacking in Python. Play with this def t2(n): return tuple(range(n)) a, b = t2(2) x = t2(3) On Feb 18, 12:58 pm, open...@ukr.net wrote: > Th...

"plot", "imshow" and "quiver"
Hi all. So recently I made the discovery that when use "imshow" command, the YDir parameter under Axis Properties is set to "reverse" by default. To me this seems counter intuitive. Why wouldn't YDir be "normal" by default? When set at "normal" it turns out that my image is actually flipped upside down. On the contrary, when use "quiver" command to plot a vector field, the YDir is set at "normal" by default. Even though this makes more sense to me, because "reversed" YDir is the correct way to display an image (as in "imshow"), the result of "quiver" is that the vector fields this time depict the objects as if they are upside down... So every time I use "quiver" I always add the following line to revert the objects back to its normal orientation... set(gca, 'YDir', 'reverse')... In addition, "plot" uses "normal" setting for YDir. The only issue I have is that I use these commands fairly frequently in my job and sometimes they can get a little bit confusing in terms of display. So I wonder why MATLAB hasn't standardized them so that the objects always get displayed the same way. It's just a comment I have. Thank you. "Clare " <flyingclare@gmail.com> wrote in message news:hefvdk$3md$1@fred.mathworks.com... > Hi all. So recently I made the discovery that when use "imshow" command, > the ...

What does "Standard C", "K&R C" , "ANSI C" mean?
I am just wondering what the following terms usually mean: 1) "Standard C" 2) "K&R C" 3) "ANSI C" I am pretty sure "ANSI C" usually refers to the C89 standard, but what about the other two? What is the "saying" for C99 standard? Thank you On 17 Jan 2005 21:26:42 -0800, "Luke Wu" <LookSkywalker@gmail.com> wrote in comp.lang.c: > I am just wondering what the following terms usually mean: > > 1) "Standard C" The current version of the C language standard. This is now known as "ISO/IEC 9899:19...

Is there any """Anti Stringizing operator #"""
Hi everybody:D I've a string that contains the name of a class. Some members told that I can use """Stringizing Operator (#)""", but the problem is here, that I have the string, & I want something vice- versa. As we know with """Stringizing Operator (#)""", we can get the stirng name of a class or ... str <--- #ClassA But I want to instantiate a class that I have just it's name as a string. ClassA * clsA = new ??? <--- Str ??? How can I do it? I don't want to use """HardCoding"&qu...

Matlab compiler, errors with "get" and "set"
Hi, I'm receiving errors for "get" and "set" commands like follows: Warning: File: c:\matlab6p5p1\toolbox\matlab\uitools\movegui.m Line: 216 Column: 9 References to "get" require the C/C++ Graphics Library when executing in stand-alone mode. You must specify -B sgl or -B sglcpp in order to use the C/C++ Graphics Library. Also, if using the -W option, you must specify either the mainhg or libhg wrapper type. A run-time error will occur if the C/C++ Graphics Library is not present when "get" is called. For some time I didn't receive these errors,...

Matlab Error: "identifier" expected, "(" found.
>>a = 100;b = 4;c = 1;d = 10;e = 20;f = 100;g = 150;h = 60; >> x0 = [1.1651,1.3316,1.3434,1.4823,1.5203,1.5544,2.1363,2.3997,4.7142]; >> f=@(x)parameterfun(x,a,b,c,d,e,f,g,h) ??? f=@(x)parameterfun(x,a,b,c,d,e,f,g,h) | Error: "identifier" expected, "(" found. Can any one please tell how to overcome this problem,from what I have searched I have found that it is caused because I am using older version of matlab (release 12.1 version 6.1) so please tell how do I over come this. Any help is appreciated On Friday, October 26, 2012 9:47:08 AM UTC+13, Rohit gupta wrote: > >>a = 100;b = 4;c = 1;d = 10;e = 20;f = 100;g = 150;h = 60; > > >> x0 = [1.1651,1.3316,1.3434,1.4823,1.5203,1.5544,2.1363,2.3997,4.7142]; > > >> f=@(x)parameterfun(x,a,b,c,d,e,f,g,h) > > ??? f=@(x)parameterfun(x,a,b,c,d,e,f,g,h) > > | > > Error: "identifier" expected, "(" found. > > > > Can any one please tell how to overcome this problem,from what I have searched I have found that it is caused because I am using older version of matlab (release 12.1 version 6.1) so please tell how do I over come this. > > > > Any help is appreciated Why are you using an anonymous function? Why not simply call your function: x=parameterfun(x0,a,b,c,d,e,f,g,h); "Rohit gupta" <im.rohit@hotmail.com> wrote in message new...

dolby "B", "C"
I've got some old cassettes with unique and original recordings that I'de like to move onto computer. They were recorded with Dolby B. Some were recorded with dolby C. I'de like to transfer the tapes to computer and then "decode" the dolby on the wav files after. My understanding is that since dolby is an analog system, it should be simple to emulate it. I already have a feeling that an expander and a low pass filter (whose strength would follow the loudness contour of the audio) might be the way to go. Any thoughts? Just curious, why do you want to do it this w...

Web resources about - How do I exclude "CTRL+C" from "dbstop if error"? - comp.soft-sys.matlab

Resources last updated: 3/23/2016 5:54:40 AM