RustConf 2020 - Error handling Isn't All About Errors by Jane Lusby

Sdílet
Vložit
  • čas přidán 7. 06. 2024
  • Error handling Isn't All About Errors by Jane Lusby
    Error handling in rust is incredibly diverse and constantly evolving. As such it is often a source of confusion for new and experienced rustaceans alike. This talk aims to clarify what error handling in rust means, the patterns that exist, when to apply them, and what libraries currently exist to help with the task.
  • Věda a technologie

Komentáře • 21

  • @RoseHayes-321
    @RoseHayes-321 Před 3 lety +18

    Excellent. Does a great job of hitting the most important points and detail.

  • @shreevari
    @shreevari Před 3 lety +3

    "Errors that print single line in the log but more context in ther terminal"
    This is awesome!

  • @NanBahlam
    @NanBahlam Před 3 lety +3

    Awesome talk!!! Great glance at the state of Rust's error handling

  • @jeanmanguy7900
    @jeanmanguy7900 Před 3 lety +8

    It was a great talk, learned a lot and gave me many ideas

  • @fyaa23
    @fyaa23 Před 3 lety +4

    This is a very good overview. I would love more talks from you with more focus on single error handling aspects, maybe by example.

  • @steve6390
    @steve6390 Před 3 lety +1

    Well done! Perfect timing for me since error handling was causing frustration.

  • @lpil
    @lpil Před 3 lety +1

    Great talk, thanks Jane! Looking forward to trying these ideas in other languages too

  • @DOPEBEATZBOYS
    @DOPEBEATZBOYS Před 3 lety +9

    5:14 nice... *recovery*

  • @alexpyattaev
    @alexpyattaev Před rokem +2

    'spooky lifetime in c++ is the most important aspect=)

  • @JazzMachine77
    @JazzMachine77 Před 3 lety +1

    Awesome talk!

  • @geshtu1760
    @geshtu1760 Před 3 lety +2

    This is awesome. Who else was super envious of the error output showing colors and sections? Going to look into this some more. Question: Is there a way to add optional support for eyre in a library so that you can retain flexibility for the caller, but if the caller does want to use eyre it's trivial to enable? I'm imagining some trait that the library's error type could implement so that conversion to eyre can be done by the application without having to implement it themselves, but it's not mandatory for the application to use it. Or perhaps just implement From for some eyre type so that an application can simply convert errors from the lib into eyre errors and automatically have all of the context there as well, the same as if the library had implemented eyre from the start

  • @linkernick5379
    @linkernick5379 Před 3 lety +3

    9:50 Important slide.
    27:02 brief discussion “library vs application” error handling.

  • @Roms8313
    @Roms8313 Před 3 lety +1

    super helpful, thanks 😀

  • @mferoldif
    @mferoldif Před 2 lety

    Great talk overall! I have one question though: what did you want to mean by "open set" at 8:09? I know the term definition from mathematics that an open set is a set that doesn't contain its boundary limits, e.g., a set X that contains all x such that a < x < b. But I'm not sure you're using this definition when you talk about "representing an open set of errors". Does it have anything to do with being able to convert any type that implements Error to an `dyn Error` object? In that case, what would boundary limits look like?

    • @trevorcoleman9125
      @trevorcoleman9125 Před 2 lety

      I think it means something like a Vec - a list of errors of dynamic length - so you can gather a number of errors and throw them all at once.

  • @syntaxed2
    @syntaxed2 Před 3 lety +2

    I still dont understand where the names "success"/"error" come from, where are these defined...does the match keyword automagically infer these from the 'result' variable?

  • @mageprometheus
    @mageprometheus Před 3 lety +5

    Thank you. In the honeymoon period of a new project, many developers rush into churning out code before deciding on these things. This is one of the things that should be mandatory even before writing the first test. You do write tests? 😃

  • @Oliver-gm3fs
    @Oliver-gm3fs Před 3 lety +1

    Very nice and informative talk. But why is my cat in this video?

  • @aklcreation6979
    @aklcreation6979 Před 3 lety

    Good

  • @thingsiplay
    @thingsiplay Před 3 lety +3

    "fehler" is a German word and means "error".

  • @lunasophia9002
    @lunasophia9002 Před 3 lety +5

    1:44 clearly the most important part of this very important talk. Pet that kitty! ❤️😺