Exceptions in Enterprise Portal in MSDAX

Exceptions in Enterprise Portal are divided into three categories

NonFatal
The exception handling code should respond appropriately and allow the request to continue normally.

AxFatal
Indicates that an unrecoverable error has occurred in Enterprise Portal. Enterprise Portal content will not display. Content not related to Enterprise Portal should display as expected.

SystemFatal
Indicates that a serious error, such as out of memory, has occurred and the request must be aborted. Errors of this kind often cause an HTTP error code 500.

E.g.


 Try  
 {  
   // Code that may encounter exceptions goes here.  
 }  
 catch (System.Exception ex)  
 {  AxExceptionCategory exceptionCategory;  
   // Determine whether the exception can be handled.  
   if (AxControlExceptionHandler.TryHandleException(this, ex, out exceptionCategory) == false)  
   {  
     // The exception was fatal and cannot be handled. Rethrow it.  
     throw;  
   }  
   if (exceptionCategory == AxExceptionCategory.NonFatal)  
   {  
   // Application code to properly respond to the exception goes here.  
   }  
 }