error-handling

How do you handle debugging when using Prototype.js

In a lot of cases when my prototype.js javascript code hits an error, I don't get any error notification, line number, etc. I usually end up tracing through my code with alert statement until I find where it dies. Is there a better way to track down these errors? ...

How can I handle errors in loading an iframe?

I have an <iframe> that other sites can include so their users can POST a form back to my site. I'd like to handle gracefully the cases where my site is down or my server can't serve the <iframe> contents (that is, a response timeout or a 4xx or 5xx error). I tried adding an onError to the <iframe> object, but that didn't seem to do any...

C Error Checking Function (Not really homework, but don't say I said it wasn't)

For my systems programming class we're doing a lot of programming in C and are required to error check most functions as we are currently learning to program with pthreads. The reason I say this is not really homework, is that it is far above and beyond what is expected for this class. Simply checking each function individually is more ...

Error Handling in Web Design

I'm thinking about some optimal methods for gracefully handling errors on a website. I'm thinking that two modes will dictate how errors are handled: Development Mode Shows all notices, warning, and fatal errors on the view they are generated from Errors are displayed in raw format Production Mode Hide all notices and warnings, no...

How to implement Exception Handling in Parsing?

I'm creating a parsing application, which parses ~20 sites, ~7-15 values from each. Pseudocode looks like: ParserA : ParserBase { public override SomeEntity Parse(...) { SomeEntity se = new SomeEntity(); //some code, parsing value1; //some code, parsing value1; //some code, parsing value1; //some code, parsing value2; //some co...

Proper error handling in ASP.NET MVC2

I have an override OnException(ExceptionContext filterContext) in my base controller to catch the app during any errors, and then log them. The problem I'm getting in my app is this particular method is fired off four times for certain errors. I'll walk you through a scenario: Let's say i navigate to: http://localhost:180/someController...

Return Null or throw Exception in retrieval method?

Possible Duplicate: Return 'null' or throw exception Say I have a method public Person LoadPersonFromDatastore(int personId) { ... } What should I do if the person was not found? Is it best to return null or should I throw an Exception? My opinion would be not to use an exception here since it adds no useful information i...

Set custom error levels in zend framework

How can I set custom error levels with Zend Framework - say, I want to disable E_NOTICE. Thanks. ...

Send email when any error occurs in CakePHP

Hi, I am using CakePHP in PHP development. I have set my debug mode to 0 in core.php file. Configure::write('debug', 1); This setting will not show any error on site. So the user/developer will not be able to see errors. Thant's why I want to make something that will send me an email with error title and error code like Warning messa...

ASP.NET MVC2 - number and location of try/catch(throw?) blocks

I'm in the process of thrashing through the whole exception-handling jungle, and I'm now trying to determine just how many try/catch blocks I need, and where to put them. From my controller I have CreateInvitation(fromUser, toUser); which calls down to my BLL method public static Invitation CreateInvitaton(User fromUser, User toUs...

How to squeeze error message out of PDO?

I can't seem to get any error message from PDO #$dbh->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING ); try { $sth = $dbh->prepare('@$%T$!!!'); print_r($sth); print_r($dbh->errorInfo()); } catch (PDOException $e) { echo $e->getMessage(); } giving out only PDOStatement Object ( [queryString] => @$%T$!!! ) Array ( ...

What do you prefer: C++ exception handling or passing a buffer to hold error messages as parameter ?

I am currently involved in developing a low level network application. We have lately run into the issue of error reporting concerning both user land and debug land. Given that some errors might fire up from lower level functions, libraries ... reporting the exact error status (code, messages, env...) from one layer to another higher lay...

What are the errors in this code?

Assume you have written a new function that checks to see if your game character has any life left. If the character does not have any life left, the function should print 'dead', if it has less than or equal to 5 life points left the function should print 'almost dead', otherwise it should print 'alive'. am_i_alive(): hit_points...

howto catch error on namespace or property not found in xml atom entry

Hi, I need some help please How is it possible to catch these errors, in a way that the program does not stop from running. $ns_gml=$item->children($namespace['georss'])->children($namespace['gml']); <b>Warning</b>: gpicasa::parseFeed() [<a href='/phpmanual/gpicasa.parsefeed'>gpicasa.parsefeed</a>]: Node no longer exists in <b>/home...

Was this undocumented RAISERROR syntax ever documented and subsequently deprecated?

I'm working on a large SQL Server codebase, some of which has been in development since at least SQL 7 and possibly before. Throughout the codebase, the method of raising an error is to use the following syntax which is, as far as I can tell, undocumented RAISERROR <error number> <error message> The error number can be any value grea...

asp.net MVC : when is IIS giving a 404 and when does it forward it to my app?

Hi, i was wondering about the following: i can define in IIS what to do with page not founds / 404, and also in my app i can put it in my CustomErrors section or just handle it in code. Now as i assume IIS always gets the request first, when does it handle the 404 for itself, and when does it let it pass through to my app? And a side...

ASP.net MVC 2 how do I handle A potentially dangerous Request.Form value was detected from the client

I have been browsing the web and stackoverflow trying to figure out how to handle this error. A potentially dangerous Request.Form value was detected from the client The error occurs when a user enters in html or xml tags( < p> or < HeyImXML>) and tries to submit a form. The input is not suppose to contain any sort of markup at ...

How do you make an error in flash somehow display once it's a .swf?

The error I have is Error opening URL "http://www.website.com/something.php?query=someinvalidquery" The query isn't actually supposed to go through, but I'd like some sort of error message saying so. ...

How to create a custom HandleErrorAttribute that is routed to somewhere other than /Error?

Is there a way to create a custom HandleErrorAttribute that instead of routing users to "Error" instead routes them to something like "Error/Unknown" (where "Error" represents an Error Controller and "Unknown" an action method in it)? Thanks ...

Which tools and methodologies are you using for logging and auditing on SOA Ecosystems?

I'm not clear about this and I would like to hear from you about tools and methodologies that you're using for logging and auditing within SOA Ecosystem? Which directions can I go? I believe in the following strategy: UI applications should log user actions: this source is about all about administration issues with clear human message...