Giter VIP home page Giter VIP logo

Comments (7)

iffyio avatar iffyio commented on May 21, 2024 1

I can create a PR to replace the tokio::io::Result usages and link that to close this PR 👍

from quilkin.

markmandel avatar markmandel commented on May 21, 2024

Given that we're also planning on allowing people to use this as a library - it seems like we should have our own Error enum(s), and expose those as public, rather than expose the underlying libraries to the outside world (especially if we ever want those to change).

(To be honest, I only recently started to look more at error handling, and getting more of a handle on it)

I'd be inclined to handcraft our of own enums/structs to start, and if we get more complicated, bring in a more sophisticated library as needed. WDYT?

from quilkin.

iffyio avatar iffyio commented on May 21, 2024

+1 on writing our own structs, it makes sense to introduce a library if/when we know it adds significant value.

from quilkin.

markmandel avatar markmandel commented on May 21, 2024

I feel like we've resolved this for now - what do you think, can we close this?

from quilkin.

iffyio avatar iffyio commented on May 21, 2024

We currently have some places where we needed to return proper errors, e.g in server.rs we still pass tokio result - the idea was to resolve those cases in this ticket.

from quilkin.

markmandel avatar markmandel commented on May 21, 2024

We currently have some places where we needed to return proper errors, e.g in server.rs we still pass tokio result - the idea was to resolve those cases in this ticket.

Ah yes! I had forgotten! Excellent point.

from quilkin.

markmandel avatar markmandel commented on May 21, 2024

Just did a quick review of server.rs and session.rs -- I think we are good to close this now.

One thing I did note - we probably should create a ticket to review of public methods, and restrict them to only being available to the crate or smaller.

Because we do still expose tokio::io::Result from some public methods, which is fine if they are only used internally (and restricted as such), but not if they are used as a public library api surface.

How does that sound?

from quilkin.

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.