Code Monkey home page Code Monkey logo

Comments (3)

lextm avatar lextm commented on June 1, 2024

Without supporting data we can only assume the agent returned a message that was not compliant with the standards.

from sharpsnmplib.

RedwoodForest avatar RedwoodForest commented on June 1, 2024

Thanks for the info @lextm.

The issue for us here (and for the similar #159) is the type of exception thrown in cases like this when the server we're communicating with is not compliant with the standards.

Because we make connections to arbitrary SNMP servers we cannot ensure that the servers we're communicating with are always compliant with the standards so we need to handle this case in our code. With the current approach of throwing exceptions like InvalidCastException and ArgumentOutOfRangeException it means we cannot distinguish bugs (in our code or the library) from a non-compliant response from the server. If instead SnmpException were thrown in cases like this it would be handled by our existing code for handling communication issues.

To use Eric Lippert's terms InvalidCastException and ArgumentOutOfRangeException generally indicate a boneheaded exception, but these cases seem like exogenous exceptions instead (because we don't control what the server we're communicating with returns), so it seems like something like SnmpException should be thrown instead.

Hope that's helpful and we really appreciate all the work you do on this library.

from sharpsnmplib.

lextm avatar lextm commented on June 1, 2024

No plan to support non-compliant agents, as they require hacks that do not really contribute to any other users of this library.

from sharpsnmplib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.