ckb-std icon indicating copy to clipboard operation
ckb-std copied to clipboard

Suggestion: More documentation on SysError.

Open jordanmack opened this issue 1 year ago • 0 comments

It would be very beneficial if these error messages had more detail in the documentation. As it is right now, there is not enough detail to give any meaningful hints to the developer on how to fix the problem.

https://github.com/nervosnetwork/ckb-std/blob/master/src/error.rs#L3-L14 https://nervosnetwork.github.io/ckb-std/riscv64imac-unknown-none-elf/doc/ckb_std/error/enum.SysError.html

An example of this is SysError::ItemMissing, which was encountered today by phroi, the developer working on iCKB. He received this error while sending a transaction. He was unable to find the proper documentation for the error. After several hours he figured out it was due to the header deps not being added to the transaction properly.

A helpful error description for each of these would explain it enough that a developer should be able to make a reasonable determination of what could be tried next.

  • Where is this error generated from?
  • What does the error mean?
  • What are common developer mistakes that could lead to this error?

jordanmack avatar May 10 '23 04:05 jordanmack