error-handling

Double quotes into asp.net mvc url

how to handle double quotes in asp.net mvc url? ...

How to substitute broken Images with JavaScript in a HTML document?

I'm wondering how you can substitute the src-property (or delete the whole img-node) with JavaScript, if the browser is realizing, that the image beyond the image-src-property doesn't exist (any more). For example: <div id="foo"> <img src="bar"> </div> And the img-tag is pointing to nowhere. In some browser, esp. the iE, are showi...

JavaScript anti-silent techniques to indicate failure

What would be a good way to report errors in JavaScript instead of relying on nulls, and undefineds when errors do occur and a function is unable to proceed forward. I can think of three approaches: do nothing throw an exception assert Here's a simple example scenario - a function that credits a user account with the amount passed in...

AS3 Errors: 1046: & 1180: Importing custom class into mc on second frame?

Pulling my hair out here trying to solve this one. I have no experience with classes...I code everybit of AS3 into the frames usually. I was trying a custom class out and it just isn't working well. I have a movieclip called mc_info_panel that I have placed onto my stage in frame one of my main timeline. One frame one of mc_info_panel i...

How to configure PHP to display detailed errors instead of error 500 page?

I have a PHP application deployed on my IIS hosting and I am always getting generic IIS "error 500" pages insteady of detailed error pages. I understand I need to modify some php.ini file (from this question). It seems that display_errors is set correctly: echo ini_get('display_errors'); outputs 1. I have also tried setting displa...

How can I detect if any output has been written? And how can I redirect if it has?

Let's say that I want some generic error handling, which can be called from all over... Ideally, I would like to just readirect to an error page using header('Location:... but, of course I can't do that it if any output has been written, so ... 1) how can I detect if any output has been written? 2) how can I load a new page if it has? ...

How to make a function call bulletproof?

Hi, I need to call a function (an LLVM JIT to be specific) from a C++ application. This call might fail or even signal abort() or exit(). How can I avoid or at least reduce effects on my host application? Someone suggested using fork(), however I need a solution for both windows and posix. Even if I would use fork() ... would it be possi...

Standard PHP error function with __LINE__ __FILE__etc ?

so, instead of lots of instances of if (odbc_exec($sql)) { } else { myErrorHandlingFunction(); } I wrap that in a function function myOdbxExec($sql) { if (odbc_exec($sql)) { } else { myErrorHandlingFunction(); } } BUT I would like myErrorHandlingFunction() to report things like __LINE__ __FILE__ etc Which lo...

Implementing Database Error Handling in CodeIgniter

Hello all I am creating a webapp using codeigniter. I want to implement a error handling function. Say for example if I call a method of a model, and if an error occurs in that method, the error handler comes into action to return some pre-formatted string. I was thinking of creating something like MY_Model, which every model class ext...

How do I log a general exception to the Event Log?

I have a windows service, in which I want a top level try-catch that catches any otherwise unhandled (or bubbled) exception, logs it to the Event Log and then swallows it so the service keeps running. However, I can't find any overload to System.Diagnostics.EventLog.WriteEntry that takes an exception as a parameter - is there no way to j...

Save the Errors in Database instead of errors.log in cakePHP

Hello folks, I need to save the Errors in a database table instead of writing in into errors.log?? How can i achieve it??? thanks in advance ...

Error handling: show error message or not?

Generally, in software design, which of the options below is preferred when there is a problem or error with a resource such as a database or file? Show an error message Do not show an error message and act as though the resource was empty (eg. do not populate a GUI component)] For example, should the user see an empty DataGrid follo...

ASP.NET MVC Custom Error Handler determine area/controller/action

In using the global error handler technique described here, http://stackoverflow.com/questions/1171035/asp-net-mvc-custom-error-handling-application-error-global-asax I want to log what area/controller/action was in effect when this error occurred. However, when putting a line in Application_Error such as: var controller = ViewContex...

Ways to show your co-programmers that some methods are not yet implemented in a class when programming in C++

What approaches can you use when: you work with several (e.g. 1-3) other programmers over a small C++ project, you use a single repository you create a class, declare its methods you don't have a time do implement all methods yet you don't want other programmers to use your code yet (because it's not implemented yet); or don't want to ...

broadcast incoming call? error

I have a strange behaviour of BroadcastReceiver when trying to listen incoming call. I set up the BroadcastReceiver to listen to both incoming calls and sms. The BroadcastReceiver run after the booting is complete. When first i fake a call into the emulator, i can not catch the call. I try again with sms and my Broadcastreceiver can catc...

In richfaces form based error message possible?

I would like a catch-all display of any errors or exceptions. For instance I would like to catch 500 responses to AJAX requests and display the summary in a text field. More so I would like a single message area for the entire form (w/o specifying a separate message tag for every input or button). How can this be implemented using richfa...

ASP.NET - Sending 500 Error Information To Yourself

Where would I need to hook in (at what event) to be able send myself every 500 error that happens on my current ASP.NET project. Something inside the global.asax? And I'd like to send myself the output that the user would see. The white/yellow/black 500 standard ASP.NET error HTML. My users only see the errors about 10% of the time. The...

Getting error message from CStdioFile::Open()?

If CStdioFile::Open fails, I want to be able to report the cause of the error. However, it appears as though it never throws an exception. Also, when I try the following: CStdioFile file; CFileException exc; bool bSuccess = (file.Open(_T("FileDNE"), _O_RDONLY, &exc) == TRUE); ASSERT_FALSE(bSuccess); CString err; exc.GetErrorMessage(e...

AJAX error handling with jQuery: should I use $.ajaxSetup() or $.fn.ajaxError()

I want to alert the user whenever there's an AJAX error. You can do this via $.ajaxSetup: $.ajaxSetup({ error: function() { alert("OOPS!") } }); But the jQuery docs recommend against this: Note: Global callback functions should be set with their respective global Ajax event handler methods-.ajaxStart(), .ajaxStop(),...

php and non existing files

on my site i call non existing files and it show index page not error 'not found page'. but i need to get this error, any ideas? update here my htaccess file # BEGIN WPSuperCache <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / AddDefaultCharset UTF-8 RewriteCond %{REQUEST_METHOD} !POST RewriteCond %{QUERY_STRING} !.*=.* Rewrite...