예제 #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));
 }
예제 #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;
        }
예제 #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;
        }
예제 #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;
 }
예제 #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;
 }