示例#1
0
 /// <summary>Serves as method which will be called in a case that an exception is thrown.
 /// </summary>
 /// <param name="exceptionObject">The exception object.</param>
 /// <returns>The <see cref="System.String"/> representation of the exception.</returns>
 private static object UnhandledExceptionHandler(object exceptionObject)
 {
     try
     {
         if (exceptionObject != null)
         {
             return(ExcelDataConverter.GetExcelRangeErrorMessage(exceptionObject.ToString()));
         }
         return(ExcelDataConverter.GetExcelRangeErrorMessage("Unknown error."));
     }
     catch (Exception exception)
     {
         return(exception.Message + ((exceptionObject != null) ? exceptionObject.ToString() : String.Empty));
     }
 }