@@ -371,13 +371,13 @@ public static ISnmpMessage GetResponse(this ISnmpMessage request, int timeout, I
371371 var responseId = response . MessageId ( ) ;
372372 if ( responseId != requestId )
373373 {
374- throw OperationException . Create ( string . Format ( CultureInfo . InvariantCulture , "wrong response sequence: expected {0}, received {1}" , requestId , responseId ) , receiver . Address ) ;
374+ throw ErrorException . Create ( string . Format ( CultureInfo . InvariantCulture , "wrong response sequence: expected {0}, received {1}" , requestId , responseId ) , receiver . Address , response ) ;
375375 }
376376
377377 return response ;
378378 }
379379
380- throw OperationException . Create ( string . Format ( CultureInfo . InvariantCulture , "wrong response type: {0}" , responseCode ) , receiver . Address ) ;
380+ throw ErrorException . Create ( string . Format ( CultureInfo . InvariantCulture , "wrong response type: {0}" , responseCode ) , receiver . Address , response ) ;
381381 }
382382
383383 #endregion
@@ -628,13 +628,13 @@ public static async Task<ISnmpMessage> GetResponseAsync(this ISnmpMessage reques
628628 var responseId = response . MessageId ( ) ;
629629 if ( responseId != requestId )
630630 {
631- throw OperationException . Create ( string . Format ( CultureInfo . InvariantCulture , "wrong response sequence: expected {0}, received {1}" , requestId , responseId ) , receiver . Address ) ;
631+ throw ErrorException . Create ( string . Format ( CultureInfo . InvariantCulture , "wrong response sequence: expected {0}, received {1}" , requestId , responseId ) , receiver . Address , response ) ;
632632 }
633633
634634 return response ;
635635 }
636636
637- throw OperationException . Create ( string . Format ( CultureInfo . InvariantCulture , "wrong response type: {0}" , responseCode ) , receiver . Address ) ;
637+ throw ErrorException . Create ( string . Format ( CultureInfo . InvariantCulture , "wrong response type: {0}" , responseCode ) , receiver . Address , response ) ;
638638 }
639639
640640 #endregion
0 commit comments