I am creating a generic error handling / logging class for our applications. The goal is to log the exception info, info about the class and function (as well as parameters) and if relevant, the information about the System.Data.SqlClient.SqlCommand object.
I would like to be able to handle passing in SqlCommands, TableAdaptors, and Sql...
This is written in PHP but it's really language agnostic.
try
{
try
{
$issue = new DM_Issue($core->db->escape_string($_GET['issue']));
}
catch(DM_Exception $e)
{
throw new Error_Page($tpl, ERR_NOT_FOUND, $e->getMessage());
}
}
catch(Error_Page $e)
{
die($e);
}
Is nested try, catch blocks a g...
There is a lot of relativity involved in working with exceptions. Beyond low level APIs where exceptions cover errors raised from hardware and the OS there is a shady area where the programmer decides what constitutes an exception and what is a normal condition.
How do you decide when to use exceptions? Do you have a consistent policy r...
I am looking for a better solution than what we currently have to deal with unexpected production errors, without reinventing the wheel.
A larger number of our products are WinForm and WPF applications that are installed at remote sites. Inevitably unexpected errors occur, from NullReferenceExceptions to 'General network errors'. Thus...
In Toyota manufacturing lines they always know what path a part have traveled. Just so they can be sure they can fix it of something goes wrong. Is this applicable in software too?
All error messages should tell me exactly what path they traveled. Some do, the error messages with stack trace. Is this a correct interpretation? Could it b...
I have VB6 application , I want to put some good error handling finction in it which can tell me what was the error and exact place when it happened , can anyone suggest the good way to do this
...
We are changing some of the text for our old, badly written error messages. What are some resources for best practices on writing good error messages (specifically for Windows XP/Vista).
...
I am writing a .NET wrapper class for an existing native class which throws exceptions. What are the best practices for translating between native C++ exceptions and Managed exceptions? Catch and re-throw on a one-to-one basis (e.g. std::invalid_argument -> System.System.ArgumentException)? Is there a mapping already drawn up somewhere?
...
Hi
Im running a ASP.NET Site where I have problems to find some JavaScript-Errors just with manual testing.
Is there a possibility to catch all JavaScript-Errors on the Client Side and log them on the Server i.e. in the EventLog (via Webservice or something like that)?
Thanks for your answers!
...
We are using SQL 2005 and the try-catch functionality to handle all of our error handling within the DB. We are currently working on deploying a .NET CLR function to make some WCF calls in the DB. This WCF procedure is written in the CLR and then deployed to SQL. If I put a try-catch block in the CLR code, it catches the error fine. Howe...
I need help logging errors from T-SQL in SQL Server 2000. We need to log errors that we trap, but are having trouble getting the same information we would have had sitting in front of SQL Server Management Studio.
I can get a message without any argument substitution like this:
SELECT MSG.description from master.dbo.sysmessages MSG
IN...
Coming from a desktop background I'm not sure exactly how to pass the exceptions I have caught to an Error page in order to avoid the standard exception screen being seen by my users.
My general question is how do I pass the exception from page X to my Error page in ASP.net?
...
I'm familiar with some of the basics, but what I would like to know more about is when and why error handling (including throwing exceptions) should be used in PHP, especially on a live site or web app. Is it something that can be overused and if so, what does overuse look like? Are there cases where it shouldn't be used? Also, what are ...
Wrong answer was autoselected by the stupid bounty system.
I'm using front page extensions to interact with SharePoint Services 3.0 as described here.
In most samples I have seen the client simply looks for particular English strings in the result and uses that to determine if an error has occurred. However, I am writing an application...
All throughout an application wherever error messages (or other user messages) are used I typically hard-code a string. Obviosly this can be really bad (especially when you may have to come back and localize an app). What is the best approach to centralize these strings? A static class? Constants? An XML File? Or a combination (like crea...
The questions says everything, take this example code:
<ul id="css-id">
<li>
<something:CustomControl ID="SomeThingElse" runat="server" />
<something:OtherCustomControl runat="server" />
</li>
</ul>
Now if an error gets thrown somewhere inside these controlls (that are located in a master page) they will take down the...
What is a good error handling practice for an asp.net site? Examples? Thanks!
...
I'm writing a scheduler or sorts. It's basically a table with a list of exes (like "C:\a.exe") and a console app that looks at the records in the table every minute or so and runs the tasks that haven't been run yet.
I run the tasks like this:
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo.UseShellExecute...
Is it possible to enumerate all the current errors being displayed through an "Error Provider" without having to access the controls?
...
Hi all,
In general, it seems that the majority of times that ConnectionDroppedHandler would get called in an OCS server application is for expected reasons e.g. server application has been unregistered, server is shutting down, etc.
Are there any unexpected situations in which ConnectionDroppedHandler can be called? Basically, i'm wond...