Last post Aug 04, 2016 11:54 PM by robby32
Aug 04, 2016 12:11 AM|robby32|LINK
I have the foollowing ,
throw new FactoryException("Unable to access current UserID, possible cause is session timeout. Please log out and retry your action.");
the code then goes to pagebase , but the issue is that when i access Server.GetLastError() , i cant see the error in the Message . Its seems that the GetLastError is empty ?
Any reason why this may happen ?
Aug 04, 2016 07:41 AM|PatriceSc|LINK
Where in PageBase and how do you get there? If you have a catch block it seems expected. AFAIK it expose an exception if it was unhandled (for example in a Error event rather than really all exceptions that happened). If using catch you'll use catch(FactoryException
ex) to handle this particular kind of exception and get its details.
Aug 04, 2016 07:55 AM|Nan Yu|LINK
Hi robby ,
You could also create a custom error page , within the Application_error event , you could log your exception / redirect user to the custom error page by :
In page_load event of error page , you could get the error by :
var error = Server.GetLastError();
Aug 04, 2016 11:54 PM|robby32|LINK
Thanks your info helped.