exception

Suppressing runtime exceptions in C# for ASP.NET MVC application

How do I suppress an exception in C#? I do not want to enclose it in a try-catch block with an empty catch block - that would defeat the purpose. I have a custom Application_Error handler/listener that checks for HttpException and I would much rather that run automatically than being prompted by Visual Studio for a HttpException and I wo...

How can I stop g++ from linking unwanted exception-handling code?

I'm developing an embedded application using GCC/G++ compiled for arm-eabi. Due to resource constraints, I'm trying to disable the standard C++ exception handling. I'm compiling the code with "-fno-exceptions -nostartfiles -ffreestanding". When a global instance of a class exists, and that class contains an instance of another class ...

Webservice unavailable

I have an ASP.NET C# 3.5 web application that consumes another ASP.NET web service as a web reference. The web service is built into some proprietary hardware device. The problem is that that device has been having troubles and not alwasy accessible. My web application is suffering brcause of it, as it takes over a minute to load. It doe...

Groovy: deploying a war file

Hi I have a groovy application running locally on my desktop. Apparently it runs error free. At least all unit tests I wrote are fulfilled. I want to deploy the application using a war file. For this I use the command grails war in the home directory of the application. When doing this I am getting the following exception: Error exec...

Boost serialization problem

Hi everyone, i have situation like this: class IData { virtual void get() = 0; virtual void set() = 0; } BOOST_ASSUME_IS_ABSTRACT(IData) BOOST_EXPORT_CLASS(IData) template<typename T> class ConcreteData : public IData { public: protected: template<typename Archive> void serialize(Archive& ar, const unsigned version) { ar &...

Can I stop COM from swallowing uncaught C++ exceptions in the callee process?

I am maintaining a project which uses inter-process COM with C++. At the top level of the callee functions there are try/catch statements directly before the return back through COM. The catch converts any C++ exceptions into custom error codes that are passed back to the caller through the COM layer. For the purpose of debugging I wa...

XStream fromXML() exception

I am trying to deserialize a string in Java using the XStream package. The XStream package can serialize my class fine. I get the XML (cannot change format of XML) from a server and try to save its node information to the corresponding variables in a certain class. My function is at the bottom and I tried to register a new converter for ...

Ajax:ModalPopup js exception, BackgroundCssClass is null

Hi I use a modal popup extender, i followed all the instructions on the toolkit sample page, except that i didn't set the property BackgroundCssClass. this is what happens: Is there a way I can get rude of it without setting the cssclass prop? I don't need any styles. If the answer is NO then please show me an example how to set it ...

Exceptions on Linux from a shared object (.so)

I have a test program called ftest. It loads .so files that contain tests and runs the tests that it finds in there. One of these tests loads and runs a .so that contains a Postgres database driver for our O/RM. When the Postgres driver throws an exception which is defined in that .so file (or one that it links to, but ftest does not li...

global.asax Application_Error reporting on original page

I think I know the answer, but is it possible to have the global.asax Application_Error event modify a textbox on the original page and not move the client to a different page? something like: Exception exp = Server.GetLastError().GetBaseException(); System.Data.SqlClient.SqlException sqlex; if (exp is System.Data.SqlClient.Sql...

Any way to find out which TField is raising EDBClient with message 'Field value required.'?

I have one TClientDataSet with several Fields and I'm getting this exception, I'm sure that I forgot to set one field value, but the question is, which Field? Is there some way to find out quickly which field is raising this exception? EDIT I solved the problem, I was connecting the TClientDataSet to the wrong provider, which had a re...

How can I rethrow an Inner Exception while maintaining the stack trace generated so far?

Duplicate of: http://stackoverflow.com/questions/57383/in-c-how-can-i-rethrow-innerexception-without-losing-stack-trace I have some operations that I invoke asynchronously on a background thread. Sometimes, things go bad. When this happens, I tend to get a TargetInvocationException, which, while appropriate, is quite useless. What I ...

How to set the ErrorCode of a ManagementException?

I want to handle a ManagementException exception for a specific ErrorCode only and am having trouble writing the unit test for it. Ordinarily, I would write the test so that it is something like the following: Searcher search = MockRepository.GenerateMock<Searcher>(); // wrapper for ManagementObjectSearcher ... search.Expect(s => s.G...

Is this a good enough system-error-to-user-friendly-error translator?

this is how I translate the thrown errors: catch (NpgsqlException ex) { if (tx != null) tx.Rollback(); if (ex.Message.Contains("foreign key constraint")) throw new Exception("Cannot delete this, this record is already referenced on other record(s)"); else ...

Is this the right exception?

I parse an XML file to load data, and when i have an attribute that has an unrecognized value, i throw an InvalidDataException. Is this the correct one or is there a better/more descriptive one ...

Log4net: context only for exception

Hi I'm looking for a way to collect a set of data, that will only be used for debugging, the data should only be logged if I log an exception. AFAIK it can happend when ILog.Error, Fatal or Debug with an exception argument when logging other data with an exception, the data shouldn't be logged. I plan to use the GlobalContext or Thread...

Can PowerShell autoconvert error output into exceptions?

In my PowerShell script I'm calling some command line tools (not cmdlets) that may output error text and set errorlevel nonzero on error conditions. I'd like any error from any of these tools to abort my script. What's the best way to do this? Is there a way to have PowerShell automatically check $? and stderr after every command and t...

BizTalk web-service call: unable to connect to remote server

I am trying to call a web service from a BizTalk (2006) orchestration. Having got the hang of the basics, I have been following this tutorial (page 74 onwards) in which i have a web reference to an external web service (I am using this web service instead of the one in the tutorial), I have my web message in a Send component, and have ...

Did i understood MsmqPoisonMessageException wrong?

If i got a service definition like this: [PoisonErrorBehavior] [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Multiple)] public class MsgQueue: IMsgQueue { public void ProcessMsg(CustomMsg msg) { throw new Exception("Test"); } } ( where ProcessMsg is the registe...

performance of C++0x exceptions

What are the performance implications of using exceptions in C++0x? How much is this compiler dependent? Should we expect to use exceptions more for general logic handling like in Java? ...