I am working on a project that is using NetTcp bindings for talking to some WCF services. When first starting out we took a bad practice example from another application that made WCF calls by using the following:
EntityObject sample = new ServiceProxy().GetEntity();
That worked great until we realized WCF was holding onto the connect...
So I have two classes:
IOPin & Node
A Node has a set of IOPins.
To support loose coupling, and separation of concerns, I don't want the IOPins to have to know anything about Node. The Node should deal with adding/removing IOPins and should also deal with any error checking logic associated with this.
This causes an issue when I want ...
This is pretty much IE related because IE is the environment I'm using to test this, but I want to know if you can affect the relevancy of the error object properties when you throw an error. Consider the following javascript:
function MyClass (Arg1, Arg2) // Line 5 of my.js
{
if (typeof Arg1 != "string")
throw new Error...
When I have an error inside a script block that I'm testing with Measure-Command, the error is show at the line of the invocation, and not at the location the error is thrown.
Here's an example:
function ThrowAnError
{
Write-Host "in ThrowAnError"
throw "ThrowAnError"
}
Measure-Command { ThrowAnError }
This reports At Scrip...
I want to use custom exception handling, for example
instead of using (Exception ex) i want to use (LoginException ex) or (RegistrationException ex) or (SomeNameException ex)
is it possible to design such custom exception handling in ASP.NET webforms?
...
I've defined <%@ page errorPage="/error.jsp" %> in the header that all JSP files include, to catch any unhandled exceptions and redirect to that error page instead of printing them. This works fine with one caveat - if error.jsp itself throws an exception, it will continuously redirect to itself in an infinite loop. I want to erase the e...
My site is set up pretty much as per the Zend Quickstart guide. The default ErrorController works locally using MAMP. But now I've deployed it to my live site I get a blank page and a "500 Internal Server Error" according to FireBug when I go to an action that doesnt exist.
On my local server I get a 404 and a nicely formatted error pa...
There are so many possible errors in POSIX environement. Why some of them (write to unconnected socket in particular) get special treatment in form of signals?
...
What do you do when you detect your get request is broken or is passing wrong types of data? Say you have a forum-page.php?forum=3 that lists all the topics related to forum 3.
What would be a good way to deal with the absence of the "forum" variable? What about if instead of being an integer, you would get a string? How would you respo...
Hi All,
Where can I view PHP errors that are generated by a Plesk 9.2 website?
I currently get a generic 500 error when I create a test PHP error:
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
I have, unsuccessfully, tried to activate error reporting in the Plesk g...
I have a situation where I am using a third party library. On machines where the library is not installed, I am getting the excption: Unable to load DLL '*.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E). However, I am wrapping the calling code in a try-catch block.
I have tried catching both Excepti...
Hi folks,
I've got some custom error handling in my ASP.NET MVC site -> seems to be working fine.
I have an Error Controller, like this :-
/Controller/ErrorController.cs
[AcceptVerbs(HttpVerbs.Get)]
public ActionResult Unknown()
{
Response.StatusCode = (int)HttpStatusCode.InternalServerError;
return View("Error");
}
[AcceptV...
Hi, I've been trying to write an error handling class that I can use on sites, that will email me in the event of an error. Problem is, when I profile the application, it's choking on the error_log function. Here's my code (omitting the class:
class ErrorHandler
{
private static $instance;
private static $mail;
private function __clone(...
In classic ASP, is there a way to handle error at application level?
Is there guidelines for handling error / exceptions in classic ASP 3 ? The Server.GetLastError() not a lot to work with...
I am looking for something like the Application_Error() found in an ASP.Net Global.asax.
Any equivalent in a global.asa ? Classes to intelligen...
I have a try/finally clause in my script. Is it possible to get the exact error message from within the finally clause?
...
My ASP.NET MVC application has a scenario where user input can directly influence the target of a call to RedirectToAction() (by way of a string) and there is a chance that the user could create a run-time error if improper input leads them to request an action that does not exist. I'd like to prevent this problem outright, but I'd like ...
hi expert,
i wants to trap sql-2000 primary key error into c# and develop my own error like
"this is duplicate Invoice Number"
kindly reply how to do this in c# application.
Thanx.
...
I believe that in properly coded systems - errors (as errors or exceptions) should not be possible (with the exception of a DB/memcached server going down causing a query to fail). Our code should not rely on any assumptions to properly work and should be as bullet proof as possible.
However, in order to insure that our systems handle ...
Does anybody have any strategy or ideas for overall handling of errors and session expiration in a big ajaxy application? In a traditional web application when everything was a post or get, it's easy to handle errors and session expiration and present friendly messages to users. Not so much with modern ajaxy web applications. My web a...
Hi all,
I am sending an error response to my jQuery.
However I can not get the response text (in the example below this would be Gone to the beach)
The only thing jQuery says is 'error'.
See this example for details:
php
<?
header('HTTP/1.1 500 Internal Server Error');
print "Gone to the beach"
?>
jQuery
$.ajax({
type: "post",
da...