error-handling

Error handling in Core Data

A few weeks ago I started using Core Data for the first time in a non-trivial application. One of the things that surprised and confused me was how error handling works. To give an example, one of the first things I tried was setting my data file as "locked" in Finder, to order to make sure I was properly handling the NSError object retu...

What should go in a robust error message for debugging?

In addition to informing the user, we want to collect information for our debugging purposes. Our system is a niche system for only about 1400 customers, and therefore we are not as well-financed as we would hope, so bugs are more common than we would like. We currently have a window that shows the first line of the error message in la...

Uniform error handling of large interfaces

Suppose I have a .NET assembly, A, which uses reflection to load assemblies B and C (also .NET). These two assemblies both implement a number of large interfaces (the same for both). When a method is called in A it tries to make B do the work. However, B is unreliable and might throw exceptions. Now A has two modes, one where it propagat...

404 Hijacking

Certain malware such as AVG hijack 404 pages in order to display a page in the browser riddled with their own ads. The only work around I've found is to abandon 404 http status codes for custom error pages in my webapp. Is there any other work around? Edit: Anybody know of any other toolbars/programs that also hijack 404 pages without...

One log file and one error handler for set of web services - possible?

We have a set of web services which is also our internal API. They perfectly share one common web.config file. Is there a way to somehow make log4net create one log for the whole site, for all of them? And have common error handler? The problem I think they are all separate virtual directories, separate applications...? But again...the...

Error handling implemented by IHttpModule doesn't work in IIS6, works in IIS5.1

Hi, I implement common error handling by using IHttpModule. Locally on my machine with WinXP it works like a charm. Once I upload solution on our test server, which is W2003 it doesn't work. Once an error occurs it displays directly in an asp.net error page. It doesn't process using my error module. Any suggestion most welcome....X. ...

When logging when is an error fatal?

In logging frameworks like log4j & log4net you have the ability to log various levels of information. Most of the levels have obvious intentions (such as what a "Debug" log is vs. a "Error"). However, one thing that I have always been timid on was classifying my logging as "Fatal". What type of errors are so severe that they should be c...

How to handle multiple errors in C#?

Hi all, I have some code that reads 10 registry keys, sometimes the values are not present sometimes the keys are not present, sometimes the value isn't boolean etc etc. How should I add error handling to this, currently it is placed in one big try{} catch{} but if the second value I read fails then the rest are not read as the program ...

How to display my application's errors in JSF?

In my JSF/Facelets app, here's a simplified version of part of my form: <h:form id="myform"> <h:inputSecret value="#{createNewPassword.newPassword1}" id="newPassword1" /> <h:message class="error" for="newPassword1" /> <h:inputSecret value="#{createNewPassword.newPassword2}" id="newPassword2" /> <h:message class="error" for="newP...

Handling nmake errorlevel/return codes

Hi all, I have an nmake-based project which in turn calls the asp compiler, which can throw an error, which nmake seems to recognize: NMAKE : fatal error U1077: 'C:\Windows\Microsoft.NET\Framework\v2.0.50727\aspnet_compiler.exe' : return code '0x1' However, when I call nmake from within a batch file, the environment variable %ERRORLEV...

internal error markers

Theoretically, the end user should never see internal errors. But in practice, theory and practice differ. So the question is what to show the end user. Now, for the totally non-technical user, you want to show as little as possible ("click here to submit a bug report" kind of things), but for more advanced users, they will want to know ...

What is the best way to get the errors from a production site in PHP?

For most production sites, you want to know when there has been an error as soon as possible. My question is how best to get this information. Usually, it's probably best to get the errors in an email as I'm not going to sit every day and watch error logs until there is an error--this would be impossible since I have 20 or more producti...

What is included in each error level in PHP

I'm basically wondering what is included in each error level, as found here in PHP. Example, where does an unset variable or key fall? Or where does a parse fall? I can't seem to find any documentation on the PHP website or general internet regarding this. Edit: I'm looking for a list of what error causes what error level/type or the ot...

Best way to suppress php errors on production servers

What is the best method of hiding php errors from being displayed on the browser? Would it be to use the following: `ini_set("display_errors", 1);` Any best practice tips would be appreciated as well! Thanks! -Matt *UPDATE: I am logging the errors, I just want to make sure that setting the display_errors value to off (or 0) will n...

Why are errors in classes only trapped at runtime?

I have a VB6 class with a method which raises an error: Public Sub DoSomething ... err.Raise 12345, description:="Error message" ... End Sub This method is called from a form: Public Sub ErrTest() On Error Goto err1 obj.DoSomething Exit Sub err1: MsgBox err.Description End Sub This works fine at runtime, but at design...

When to catch java.lang.Error?

In what situations should one catch java.lang.Error on an application? ...

Classic ASP Error Catching - Can it be done directly using an ASP.Net page?

Is it possible to catch ASP errors in ASP.Net (setup custom error pages in IIS) and somehow gain access to the Err oject or something similar like you would using server.GetLastError() in VBScript? Thanks. ...

Access VBA: Suppressed Runtime Errors

While I'm developing my MS Access application, I open it with shift click. When an Error occurs, that is not trapped (by ON ERROR ...), a message box pops up informing me about the error. This is a good thing. When a user open my application, he does't shift click, and an appropriate Start Form opens. However, now untrapped Errors don't...

debugging a windows service, adding db logging to catch cluase a bad idea?

Hi, I have a windows service I am trying to debug. Is it a bad idea to add error logging in the Catch() clause? My logging is using a database to log the errors btw. ...

How do I turn off custom error handling in IIS for my web site?

How do you even look at the web.config file? I don't know where to go to turn custom errors off...help! I tried command prompt and java script....can any one help me? ...