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)); }
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; }
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; }
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; }
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; }