exception

How to implement SEH (Structured Ecxeption Handling) in VB6?

Could someone provide some example on implementing SEH in VB6? Everything I've seen so far is in C++ ...

How do I use the information about exceptions a method throws in .NET in my code?

For many methods in .NET, the exceptions they can potentially throw can be as many as 7-8 (one or two methods in XmlDocument, Load() being one I think, can throw this many exceptions). Does this mean I have to write 8 catch blocks to catch all of these exceptions (it is best practise to catch an exception with a specific exception block...

Can the C++ `new` operator ever throw an exception in real life?

Can the new operator throw an exception in real life? And if so, do I have any options for handling such an exception apart from killing my application? Update: Do any real-world, new-heavy applications check for failure and recover when there is no memory? See also: How often do you check for an exception in a C++ new instructio...

.NET remoting exception: Permission denied: cannot call non-public or static methods remotely.

I'm writing a program which will allow to load a specific managed .DLL file and play with it. Since I want the ability to unload the .DLL file, I'm creating two AppDomains - one for the app itself, the other for the currently loaded .DLL. Since most of the objects in the loaded .DLL do not serialize well, I'm creating a MarshalByRefObje...

Why is XmlSerializer throwing an InvalidOperationException?

public void Save() { XmlSerializer Serializer = new XmlSerializer(typeof(DatabaseInformation)); /* A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll A ...

Problem with Google Analytics for Android : "Dispatcher thinks it finished, but there were 543 failed events"

Anyone know how to solve this problem? 03-23 13:03:20.585: WARN/googleanalytics(3430): Problem with socket or streams. 03-23 13:03:20.585: WARN/googleanalytics(3430): java.net.SocketException: Broken pipe 03-23 13:03:20.585: WARN/googleanalytics(3430): at org.apache.harmony.luni.platform.OSNetworkSystem.sendStreamImpl(Native Met...

InvalidCastException for two Objects of the same type

hi, I have this weird problem that I cannot handle myself. A class in the model of my mvp-project designed as singleton causes an InvalidCastException. The source of error is found in this code line where the deserialised object is assigned to the instance variable of the class: engineObject = (ENGINE)xSerializer.Deserialize(str); It oc...

Handling errors in ASP.NET

A few questions on handing errors- I assume it's best to handle them in Application_OnError(){}? Do you then prefer to write them error to the event log, write them to a custom file locally or email them? If the latter, do you use any specialist libraries to pre-format the exception email? ...

Oracle JDBC connection exception in Solaris but not Windows?

I have some Java code that connects to an Oracle database using DriverManager.getConnection(). It works just fine on my Windows XP machine. However, when running the same code on a Solaris machine, I get the following exception. Both machines can reach the database machine on the network. I have included the Oracle trace logs. Mar 2...

Exception Specification

I know that this feature will be deprecated in C++0x, but for me as a total novice it seems like a good idea to have it. Could anyone explain to me why isn't a good idea? ...

Passing Validation exceptions via WCF REST

I am using WCF and REST, and I have complex types, which are working fine. Now I need to check for validation, I am thinking of using DataAnnotations e.g. public class Customer { [Required] public string FirstName {get;set;} } Now where the issue is how do I pass this validation down to the REST service? ALso I need to validat...

Grails' gui datatable exception

HI I'm using gui's datatable in grails, but when I try to run the code, I get this exception: org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: org.grails.grailsui.ResourcesTagLibService.stylesheetTag() is applicable for argument types: (java.lang.String, java.lang.String...

Visual Studio 2008 built-in web server needs integrated pipeline mode for Adding Http Header

Using Visual Studio 2008 and built-in web server. In a Web Handler .ashx file public void ProcessRequest(HttpContext context) { context.Response.ContentType = MimeType_text_xvcard; context.Response.Headers.Add(HttpHeader_ContentLength, "2138"); when I try to add an HTTP header I get the exception: This operat...

Destructors not called when native (C++) exception propagates to CLR component

We have a large body of native C++ code, compliled into DLLs. Then we have a couple of dlls containing C++/CLI proxy code to wrap the C++ interfaces. On top of that we have C# code calling into the C++/CLI wrappers. Standard stuff, so far. But we have a lot of cases where native C++ exceptions are allowed to propagate to the .Net wor...

java rest web service RuntimeException WEB9033

hi, i'm developing a rest web service in java. i'm using htmlparser library on it. but when i try to run service i'm getting this exception. i can build it successfully. and org.htmlparser.beans.StringBean class exists in project. exception javax.servlet.ServletException: java.lang.RuntimeException: WEB9033: Unable to load class wi...

C# Class Instantiation Overflow

Scenario I have a C# Win Forms App, where the Main Form contains a loop that creates 3000 Instances of another CLASS (CLASS B). Inside Form B there are a large number of properties and fields and a bunch of methods that do a fair amount of processing. Question Will the creation of 3000 of these classes give me problems? I'm thinking ...

Getting a "No default module defined for this application" exception while running controller unit tests in zend framework

I have an application with the default directory structure, for an application without custom modules (see structure figure at the end). I have written a ControllerTestCase.php file as instructed in many tutorials, and I've created the appropriate bootstrap file as well (once again, see figures at the end). I've written some model te...

How to throw and handle exceptions in R6RS Scheme

What is the standard way to throw and catch exceptions in R6RS Scheme? I'm looking for syntax that works in any version of Scheme (not just PLT) that implements R6RS. R6RS guard syntax looks like it might fit the bill, but can somebody show me an example of how to actually use it? ...

Exactly How Does My C++ Program Terminate When it Runs Out of Memory?

The following C++ program crashes on my Windows XP machine with a message "Abnormal program termination" class Thing {}; int main() { for (;;) new Thing(); } I would say it's an out of memory problem, except I'm not sure Windows gets near the limit. Is it Windows killing it on purpose? If so, how does it decide? ...

WPF - What information to capture when handling unhandled exceptions?

I am developing an application in WPF / .Net 3.5 that will be available for download on the internet. I am - to the best of my ability - writing bug free code, and using exceptions only where necessary. However my experience with software development has shown that users always manage to do something strange which causes an exception to ...