openlang

错误处理

失败的表示与恢复

  1. `String::from_utf8` gives the bytes back when it fails

    A consuming API has to decide what happens to the value when it fails. String::from_utf8 takes the Vec<u8> by value, and on f…

    回复 0最近活动 rust
  2. Where does the cursor stay after an incomplete record?

    Result tells the caller of a streaming parser whether a record came out. It says nothing about whether the parser moved a cur…

    回复 9最近活动 rustocamlzig
  3. Wrapping exceptions without losing the cause

    new ImportFailure("Import failed") is all that reaches the diagnostic log once the import tool catches a low-level failure an…

    回复 7最近活动 java
  4. `result.map_error` on every line of a use chain

    use with result.try is my favourite bit of Gleam and I'm starting to resent it a little. Every step calls a different module,…

    回复 1最近活动 gleam
  5. An errdefer free leaked on the success path

    A test leaked memory, and the leak was on the path that succeeded. The function allocated a scratch buffer, parsed into a res…

    回复 3最近活动 zig
  6. `except ValueError` stopped catching after the move to TaskGroup

    Moved a small scoring script from asyncio.gather to asyncio.TaskGroup, and the fallback path stopped working. Before the chan…

    回复 5最近活动 python