Esempio n. 1
0
 internal static MqErrorE MqErrorSet2(IntPtr context, Exception ex)
 {
     if (ex is MqSException)
     {
         MqSException exm = (MqSException)ex;
         MqErrorSet(context, exm.num, exm.code, exm.txt, IntPtr.Zero);
     }
     else
     {
         MqErrorC(context, "ErrorSet", -1, ex.ToString());
     }
     return(MqErrorGetCode(context));
 }
Esempio n. 2
0
        private void ErrorBufToCsWithCheck(MqErrorE err)
        {
            if (err <= MqErrorE.MQ_CONTINUE)
            {
                return;
            }
            IntPtr       errorP = MqBufferGetContext(buf);
            MqSException ex     = new MqSException(
                MqErrorGetNum(errorP), MqErrorGetCode(errorP), Marshal.PtrToStringAnsi(MqErrorGetText(errorP))
                );

            MqErrorReset(errorP);
            throw ex;
        }
Esempio n. 3
0
        private void ErrorMqToCsWithCheck(MqErrorE err)
        {
            if (err <= MqErrorE.MQ_CONTINUE)
            {
                return;
            }
            MqSException ex = new MqSException(
                MqErrorGetNum(context),
                MqErrorGetCode(context),
                Marshal.PtrToStringAnsi(MqErrorGetText(context))
                );

            MqErrorReset(context);
            throw ex;
        }
Esempio n. 4
0
 private void ErrorMqToCsWithCheck(MqErrorE err)
 {
     if (err <= MqErrorE.MQ_CONTINUE) return;
       MqSException ex = new MqSException(
       MqErrorGetNum(context),
       MqErrorGetCode(context),
       Marshal.PtrToStringAnsi(MqErrorGetText(context))
       );
       MqErrorReset(context);
       throw ex;
 }
Esempio n. 5
0
 private void ErrorBufToCsWithCheck(MqErrorE err)
 {
     if (err <= MqErrorE.MQ_CONTINUE) return;
       IntPtr errorP = MqBufferGetContext (buf);
       MqSException ex = new MqSException(
     MqErrorGetNum(errorP), MqErrorGetCode(errorP), Marshal.PtrToStringAnsi(MqErrorGetText(errorP))
       );
       MqErrorReset(errorP);
       throw ex;
 }