internal static Exception Create(string message, Exception innerException)
 {
     message ??= innerException?.Message;
     if (innerException is IscException iscException)
     {
         if (iscException.ErrorCode == IscCodes.isc_cancelled)
         {
             return(new OperationCanceledException(message, innerException));
         }
         else
         {
             var result = new FbException(message, innerException);
             result.ProcessIscExceptionErrors(iscException);
             return(result);
         }
     }
     else
     {
         return(new FbException(message, innerException));
     }
 }