Ask a Question related to ASP.NET Building Controls, Design and Development.
-
Jon Paal #1
ugly exception messages
how can I get a better looking exception error message to display, instead of the standard error page from asp.net when throwing an
exception like:
If allowExceptions And license Is Nothing Then
If errorMessage Is Nothing Then
Throw New LicenseException(type)
Else
Throw New LicenseException(type, instance, errorMessage)
End If
End If
Jon Paal Guest
-
#32101 [Com]: Exception in unknown on line 0 when throwing exception inside exception handler
ID: 32101 Comment by: dhopkins at DonHopkins dot com Reported By: ceefour at gauldong dot net Status: No... -
Tabs ugly
http://www.dmdregistry.org/reports/predictor_flash/bin/tabtest.swf Notice 1st tab has "..." Why? Click on second tab and the end "t" gets... -
ugly code!
<?php function ugly_array() { return array(1, 2, 3, 4, 5); } $arr = ugly_array(); echo $arr; ?> not so ugly :) now ... I want to get rid... -
SoapExtension for Global Exception handling; but prevent exception from propagating!!
Hi, I wrote a SoapExtension for Global Exception handling in Webservice and it works!!!! Now i want to catch the exception that happen in the... -
good, bad, or just ugly
Taking the content out of context the site seems to navigate easily. FireLion ------------------- may the flash be with you -
Teemu Keiski #2
Re: ugly exception messages
You can use custom error pages, or catch errors at page elevel (Page_Error
or event handlers) and show it in a nice Label or something.
Related:
[url]http://blogs.msdn.com/mattwag/archive/2005/02/07/368605.aspx[/url]
[url]http://www.codeproject.com/aspnet/ErrorHandlingASPNET.asp[/url]
--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
[url]http://blogs.aspadvice.com/joteke[/url]
"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot com> wrote in message
news:uwWvPrD1GHA.3464@TK2MSFTNGP03.phx.gbl...> how can I get a better looking exception error message to display, instead
> of the standard error page from asp.net when throwing an exception like:
>
> If allowExceptions And license Is Nothing Then
> If errorMessage Is Nothing Then
> Throw New LicenseException(type)
> Else
> Throw New LicenseException(type, instance, errorMessage)
> End If
> End If
>
>
>
>
Teemu Keiski Guest
-
Jon Paal #3
Re: ugly exception messages
The trick I found to work is to use Synchronous HTTP Handlers
[url]http://windowssdk.msdn.microsoft.com/en-us/library/ms228090.aspx[/url]
"Teemu Keiski" <joteke@aspalliance.com> wrote in message news:%23nNIZUP1GHA.4748@TK2MSFTNGP04.phx.gbl...> You can use custom error pages, or catch errors at page elevel (Page_Error or event handlers) and show it in a nice Label or
> something.
>
> Related:
>
> [url]http://blogs.msdn.com/mattwag/archive/2005/02/07/368605.aspx[/url]
> [url]http://www.codeproject.com/aspnet/ErrorHandlingASPNET.asp[/url]
>
> --
> Teemu Keiski
> ASP.NET MVP, AspInsider
> Finland, EU
> [url]http://blogs.aspadvice.com/joteke[/url]
>
>
>
> "Jon Paal" <Jon[ nospam ]Paal @ everywhere dot com> wrote in message news:uwWvPrD1GHA.3464@TK2MSFTNGP03.phx.gbl...>>> how can I get a better looking exception error message to display, instead of the standard error page from asp.net when throwing
>> an exception like:
>>
>> If allowExceptions And license Is Nothing Then
>> If errorMessage Is Nothing Then
>> Throw New LicenseException(type)
>> Else
>> Throw New LicenseException(type, instance, errorMessage)
>> End If
>> End If
>>
>>
>>
>>
>
Jon Paal Guest
-
Brennan Stehling #4
Re: ugly exception messages
In your Global.asax you can handle the Application_Error event. From there
you can do what you like with the exception. You can access that exception
as...
Server.GetLastError
Based on what went wrong you may be able to handle it. Otherwise you can
simply call Response.Redirect to send the user to a static error page.
You can also log the exceptions at this point, perhaps placing it in a
database, and run metrics on it to determine the most frequently raised
exceptions to prioritize which ones you fix first.
Brennan Stehling
[url]http://brennan.offwhite.net/blog/[/url]
"Jon Paal" <Jon[ nospam ]Paal @ everywhere dot com> wrote in message
news:uwWvPrD1GHA.3464@TK2MSFTNGP03.phx.gbl...> how can I get a better looking exception error message to display, instead
> of the standard error page from asp.net when throwing an exception like:
>
> If allowExceptions And license Is Nothing Then
> If errorMessage Is Nothing Then
> Throw New LicenseException(type)
> Else
> Throw New LicenseException(type, instance, errorMessage)
> End If
> End If
>
>
>
>
Brennan Stehling Guest



Reply With Quote

