Example #1
0
        public static ErrorDetails GetLastError()
        {
            int errorCode = GetErrorCode();

            if (KnownErrors.ContainsKey(errorCode))
            {
                return KnownErrors[errorCode];
            }

            string message = Marshal.PtrToStringAnsi(LibZmq.zmq_strerror(errorCode));

            var errorDetails = new ErrorDetails(errorCode, message);
            KnownErrors[errorCode] = errorDetails;

            return errorDetails;
        }
Example #2
0
 internal ZmqSocketException(ErrorDetails errorDetails)
     : base(errorDetails)
 {
 }
Example #3
0
 internal ZmqException(ErrorDetails errorDetails)
     : this(errorDetails.ErrorCode, errorDetails.Message)
 {
 }
Example #4
0
 internal ZmqDeviceException(ErrorDetails errorDetails)
     : base(errorDetails)
 {
 }