{}
public UnixIOException (int errno)
- : base (UnixMarshal.GetErrorDescription (Native.NativeConvert.ToErrno (errno)))
+ : base (GetMessage (Native.NativeConvert.ToErrno (errno)))
{
this.errno = errno;
}
public UnixIOException (int errno, Exception inner)
- : base (UnixMarshal.GetErrorDescription (Native.NativeConvert.ToErrno (errno)), inner)
+ : base (GetMessage (Native.NativeConvert.ToErrno (errno)), inner)
{
this.errno = errno;
}
- [Obsolete ("Use UnixIOException (Mono.Unix.Native.Errno) constructor")]
- public UnixIOException (Error errno)
- : base (UnixMarshal.GetErrorDescription (errno))
- {
- this.errno = UnixConvert.FromError (errno);
- }
-
- [Obsolete ("Use UnixIOException (Mono.Unix.Native.Errno, System.Exception) constructor")]
- public UnixIOException (Error errno, Exception inner)
- : base (UnixMarshal.GetErrorDescription (errno), inner)
- {
- this.errno = UnixConvert.FromError (errno);
- }
-
public UnixIOException (Native.Errno errno)
- : base (UnixMarshal.GetErrorDescription (errno))
+ : base (GetMessage (errno))
{
this.errno = Native.NativeConvert.FromErrno (errno);
}
public UnixIOException (Native.Errno errno, Exception inner)
- : base (UnixMarshal.GetErrorDescription (errno), inner)
+ : base (GetMessage (errno), inner)
{
this.errno = Native.NativeConvert.FromErrno (errno);
}
get {return errno;}
}
- [Obsolete ("The type of this property will change in the next release")]
public Native.Errno ErrorCode {
get {return Native.NativeConvert.ToErrno (errno);}
}
+
+ private static string GetMessage (Native.Errno errno)
+ {
+ return string.Format ("{0} [{1}].",
+ UnixMarshal.GetErrorDescription (errno),
+ errno);
+ }
}
}