Fan.Sys.Err.fanToDotnet C# (CSharp) Method

fanToDotnet() public static method

This method is used by FCodeEmit to generate extra entries in the exception table - for example if fcode says to trap NullErr, then we also need to trap System.NullReferenceException. Basically this is the inverse of the mapping done in make(Exception).
public static fanToDotnet ( string ftype ) : string
ftype string
return string
        public static string fanToDotnet(string ftype)
        {
            // TODO - need to trap as well...
              //if (ftype == "Fan.Sys.IndexErr")) return "ArgumentOutOfRangeException";

              if (ftype == "Fan.Sys.NullErr")  return "System.NullReferenceException";
              if (ftype == "Fan.Sys.CastErr")  return "System.InvalidCastException";
              if (ftype == "Fan.Sys.IndexErr") return "System.IndexOutOfRangeException";
              if (ftype == "Fan.Sys.ArgErr")   return "System.ArgumentException";
              if (ftype == "Fan.Sys.IOErr")    return "System.IO.IOException";
              if (ftype == "Fan.Sys.InterruptedErr") return "System.Threading.ThreadInterruptedException";
              if (ftype == "Fan.Sys.UnsupportedErr") return "System.NotSupportedException";
              return null;
        }