Protected void Application_Error(Object sender, EventArgs e){ Response.Write("Unexpected exception occured on (“ & Now & “) ! " + Server.GetLastError().Message); Response.End();}
<customErrors mode="On" /<
if (some_contition) then throw new Exception("New Exception")end if
Try [try statements ] Catch [exception [As type] ] [ When expression ] [catch statements ] [Exit Try ][Finally [ finally statements ] ]End Try