Archive

Archive for February, 2011

Handling Un Expected Error Occurred in SharePoint : Exception Handling

February 12, 2011 1 comment

if you need to show your custom message instead of “unexpected error occurred” in SharePoint.
Just go through the trust worthy tip Smile.

use SPException : which represents Windows SharePoint Services exceptions

  • Exception Handling

try

{

//code ….

}

Catch(Exception ex)

{

throw new SPException(“Your User-friendly message”);

}

Advertisements
Categories: SharePoint