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; }
public MqSException(SerializationInfo info, StreamingContext context) { p_txt = (String)info.GetValue("p_txt", typeof(string)); p_num = (int)info.GetValue("p_num", typeof(int)); p_code = (MqErrorE)info.GetValue("p_code", typeof(MqErrorE)); }
internal MqSException(int mynum, MqErrorE mycode, string mytxt, Exception inner) : base(mytxt, inner) { p_txt = mytxt; p_num = mynum; p_code = mycode; }
public MqSException() : base("csmsgque ERROR") { p_txt = "csmsgque ERROR"; p_num = -1; p_code = 0; }
private static extern void MqErrorSet([In] IntPtr context, [In] int num, [In] MqErrorE code, [In] string message, [In] IntPtr errctx);
public MqSException(SerializationInfo info, StreamingContext context) { p_txt = (String) info.GetValue("p_txt", typeof(string)); p_num = (int) info.GetValue("p_num", typeof(int)); p_code = (MqErrorE) info.GetValue("p_code", typeof(MqErrorE)); }
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 static extern void MqErrorSet(IntPtr context, int num, MqErrorE code, string message);
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; }