Mono Class Library: Mono.Unix.UnixMarshal Overview | MembersMono.Unix.UnixMarshal.ThrowExceptionForErrorIf Method |
Throws an exception that best matches errno if retval is -1. [Edit]
|
- retval
- A int containing the return value of a method from Mono.Unix.Native.Syscall. [Edit]
- errno
- A Mono.Unix.Native.Errno specifying the exception to throw. [Edit]
If retval is -1, then this method is equivalent to calling UnixMarshal.ThrowExceptionForError (errno). Otherwise, nothing is done.
If the exception thrown is not a Mono.Unix.UnixIOException, then the exception's Exception.InnerException property will be set to a Mono.Unix.UnixIOException instance wrapping errno, if possible.
Note: ArgumentOutOfRangeException does not have its Exception.InnerException property set, as ArgumentOutOfRangeException does not provide a constructor that sets this property.[Edit]
Namespace: Mono.Unix
Assembly: Mono.Posix (in Mono.Posix.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0