I have a .aspx page calling a .asmx page's web service. In that .net web service I attempt to open a database connection to SQLServer 2008. The connection is failing. I am not sure why. I am doing this in a try / catch and the catch does get hit when I debug. I'm not sure what I can output there though as I don't have access to the serve...
How can i handle parse & fatal errors using a custom error handler?
...
If I have a view that handles the management of friends, meaning there is a view to handle adding, removing, blocking, unblocking, and accepting/denying invitations to become friends. The problem I have run into is when I try to provide meaningful errors to users who end up at a url they shouldn't be at.
For example if User1 and User2 a...
This one has been puzzling my for some time now.
Let's imagine a class which represents a resource, and in order to be able to use this resource one needs to first call the 'Open' method on it, or an InvalidOperationException will be thrown.
Should my code also check whether someone tries to open an already open resource, or close an a...
This is not necessarily a Flex-specific question, but I'll use Flex in my example:
Scenario: We have a fairly complex MVC Flex application that uses remoting and makes several asynchronous calls on a single page. Some of the calls are:
GetUserOrders
GetCurrentOrder
GetUserDetails
If there is a network or DB error, this will throw th...
Hello,
is there an error-reporting-framework you would suggest for use in .net. I need possibilities like e-mail-reporting with fileappending to e-mail. The user should have the possibility to add information to the report and also should have the possibility to remove report-files, i.e. if they contains privacy-critical data. There als...
i want to develop a procedure for following scenario.
I have one source, one target and one error table. Target and Error tables have all fields that are present in source tables. But the data type of all fields for error table are varchar. Error table don't have integrity, foreign key and other constraints.
Error table also have t...
I have some tricky AJAX code on a form, and sometimes it will fail (don't ask why, I can't get around it). When this happens, I need to trap the error, reset a hidden field indicator, and submit the form naturally so that the user does not have an unpleasant experience. I planned on using window.onerror to do this, but it is never firi...
I have a page on my website (high traffic) that does an insert on every page load.
I am curious of the fastest and safest way to (catch an error) and continue if the system is not able to do the insert into MySQL. Should I use try/catch or die or something else. I want to make sure the insert happens but if for some reason it can't I ...
I've been developing a web application with PHP and MySQL. The other day, I made some changes to the database and adapted one page to the new table layout but not another page. I didn't test well enough, so the site went online with the error still in the other page. It was a simple MySQL error, and once one of my co-workers spotted it, ...
I understand the significance of the term 'fatal error', but I want to write a test class like this (disgustingly simplified):
class tester {
function execute() {
if( @$this->tryit() === true ) return true;
return false;
}
function tryit() {
$doesntexist = new noobject();
return true;
}
}
act...
There are certain areas in your code that you don't want the program execution to stop, like say during a checkout at a ecomm store.
I was thinking of creating a special 'return' type that looks like:
public bool SpecialReturn
{
public bool IsSucess {get;set;}
public List Messages {get;set;}
}
I could put an enum there to ret...
If I have a multi-layer Winform app with a Presentation, Business and Data Layer for example, and I encounter an error in either the Business Layer or Data Layer for which the only logical action is to log the error and inform the user that an error has occurred where should the logging take place?
Should I put the the methods in the Bu...
Hi All,
I have a catch-all route setup in ASP.NET MVC, so I can capture /this-page, /that-page etc.
When you hit a page the action is invoked, say Index(string page) and then page is tested against a value in the database to determine if the page can be found. If it can't be found, I want to display the view FileNotFound which is in ...
When I are using Java we put System.out.println() for identifying errors, where it went wrong.
A very naive method.
With android, I cannot even use this method to isolate why the app crashed.
With Rails we would read the log file.
But as I am new to Java and android, I don't know which is the best practice.
I believe there is a best ...
I'm trying to log javascript errors on a productive site. So far it worked quite well with the following code included in the site:
function catcherr(errorMessage, url, line) {
var parameters = "msg=" + escape(errorMessage)
+ "&url=" + escape(url)
+ "&line=" + escape(line);
new Image().src = "/error.gif?...
Every now and then there's a strong need to write a program in such a way that it never (really never) shows an error message as a message box. For example it can be a program run inside a daily build - if it hangs with a message box the daily build hangs.
Unfortunately VC++ runtime has a lot of ways to trigger message boxes when indica...
I am developing a website using PHP. I use Javascript/jquery to control/regulate user input. Of course I need to validate user input against these rules in PHP script. However, do I have to display specific error messages once an error is detected in PHP script? I mean if the Javascript runs properly, the errors of input won't come out i...
When my script starts, I have:
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
And then, I register my custom error handler with PHP:
function handleError($code, $text, $file, $line) {
echo "&%!!";
return true;
}
set_error_handler('handleError');
Next, there comes some code...
Hi All,
I have a JSP page which includes an iframe , Iframe contains the image display part & some other part, The problme is whenevr the iframe encounters an error, it gets redirected to error page (Error page is defined for the JSP) but not the whole page, only the iframe conained part of the page displays an error, I want the whole p...