exception

Any way in Visual Studio to not break on throwing of a specific exception?

Is there a pragma or debugger attribute which will allow the debugger to not break on the throwing of a specific exception even though under the Debug >> Exceptions menu I've told it to break when any CLR Exceptions are throw? In general while developing I like to have it break on exceptions while debugging so that I can immediately ins...

ARM9 SVC_STACK out of range?

I'm debugging some odd ARM exceptions in an embedded system using the IAR workbench toolchain. Sometimes, when an exception is trapped the SVC_STACK is reported as out of range (very out of range!) Is this relevant, or just an artifact of the J-Link JTAG debugger? What is the SVC_STACK used for? It is set to 0x1000 size, but when it is o...

"Inner exception" (with traceback) in Python?

My background is in C# and I've just recently started programming in Python. When an exception is thrown I typically want to wrap it in another exception that adds more information, while still showing the full stack trace. It's quite easy in C#, but how do I do it in Python? Eg. in C# I would do something like this: try { ProcessFil...

The SaveAs method is configured to require a rooted path, and the path '~\\images\\594083964.jpg' is not rooted.

The SaveAs method is configured to require a rooted path, and the path '~\images\594083964.jpg' is not rooted. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Web...

Should I bother throwing an exception from this method?

I'm performing some parameter validation in a method and throwing an exception where necessary. Do I need to bother manually throwing exceptions of this type? As long as the caller is wrapped in a try..catch block a similar exception is thrown regardless of whether the manual checks are in place. public static Int16 ToInt16(this b...

Cache Dependancy Off causing exception..

Im getting an exception in my data tier when I try to disable cache dependancy in SQL server.. System.Exception: TblSettings::Insert::Error occured. ---> System.Data.SqlClient.SqlException: Could not find stored procedure 'dbo.AspNet_SqlCacheUpdateChangeIdStoredProcedure'. The statement has been terminated. Enabling cache dependan...

How can I use FileInfo class, avoiding PathTooLongException?

How can I use (to avoid PathTooLongException): System.IO.FileInfo with paths bigger than 260 chars? Are there similar classes/methods that return the same result of FileInfo class? ...

Hoptoad v. Exceptional v. exception_notification v. exception_logger

Which of the following exception notification solutions is the best? Exceptional Hoptoad exception_notification exception_logger ...

Raising an exception on updating a 'constant' attribute in python

As python does not have concept of constants, would it be possible to raise an exception if an 'constant' attribute is updated? How? class MyClass(): CLASS_CONSTANT = 'This is a constant' var = 'This is a not a constant, can be updated' #this should raise an exception MyClass.CLASS_CONSTANT = 'No, this cannot be updated, ...

Could ARM9 Prefetch Abort Exception be a software problem?

So I'm getting a "prefetch abort" exception on our arm9 system. This system does not have an MMU, so is there anyway this could be a software problem? All the registers seem correct to me, and the code looks right (not corrupted) from the JTAG point of view. Right now I'm thinking this is some kind of hardware issue (although I hate to ...

j2me: Error opening stream - "java.io.IOException: -7334"

I am making HTTP connections to server to get some data. It works on most devices, but I'm getting this error on Sony Ericsson P1i. I have found error description: KErrHttpInvalidHeaderInRequest -7334 Request contained a response header or a entity header but no body Body should exists, I mean, data is not zero-length, and other d...

On Silverlight initialization, what exception to throw?

What's the best exception to throw if a Silverlight app fails initialization or fails to load? Or should I not throw an exception at all? ...

Hql problem in where clause

I have a persistent class Author with two fields: int id, String name. Problem is that whenever I execute query this way: Session s = HibernateUtil.getSessionFactory().getCurrentSession(); s.beginTransaction(); Query q = s.createQuery("from Author"); return (Author)q.list().get(0); It works fine and returns me an Author object with ...

A bunch of logged exceptions in Microsoft.VisualBasic.dll

I have a large project where we have 2-3 dll projects that are converted from VB6 to VB.NET. We have fixed all the issues that caused compilation errors, and most of obvious issues in running, so now we have basically a program up and running. The exe is created from scratch in VB.NET, using a lot of functionality from the converted dll'...

ARM Undefined Instruction error

I'm getting an Undefined Instruction error while running an embedded system, no coprocessor, no MMU, Atmel 9263. The embedded system has memory in the range 0x20000000 - 0x23FFFFFF. I've had two cases so far: SP 0x0030B840, LR 2000AE78 - the LR points at valid code, so I'm not sure what causes the exception, although the SP is bogus. W...

Groovy Jasper plugin

Hi! I have updated from grails 1.1 to grails 1.1.1 and I also updated the jasper plugin from version 0.95 to version 0.97 Now I am getting an exception when calling the plugin (see below). Any Idea what is wrong? Thanks! Luis 2009-09-02 18:54:57,846 [2804015@qtp0-4] ERROR errors.GrailsExceptionResolver - java.lang.NullPointerEx...

Default encoding of exception messages

The following code examines the behaviour of the float() method when fed a non-ascii symbol: import sys try: float(u'\xbd') except ValueError as e: print sys.getdefaultencoding() # in my system, this is 'ascii' print e[0].decode('latin-1') # u'invalid literal for float(): ' followed by the 1/2 (one half) character print unicode...

How to throw a checked exception from a java thread?

Hey, I'm writing a network application, in which I read packets of some custom binary format. And I'm starting a background thread to wait for incoming data. The problem is, that the compiler doesn't let me to put any code throwing (checked) exceptions into run(). It says: run() in (...).Listener cannot implement run() in java.lang.Runn...

Why are the names of generic types mangled in a .NET stack trace?

I have an exception being thrown from a C# method, that takes a generic list as a paremeter. private static void DoWork(List<ClassName> a) { } When it throws an exception, the stack trace shows an `1 instead of the class name for the list. Why is this? This is what the stack trace has. ... at DoWork(List`1 a). ... ...

Pros and Cons of developing/using Attribute Classes to handle exceptions in a .NET Code?

Hi all, I would like to pose a question about developing and using attribute classes in your code. I'm quite a newbie in developing attribute classes (it is an uncharted territory on my book!), and was thinking of creating an attribute class that will handle exceptions in methods instead of coding a try/catch() method in each method or...