aboutsummaryrefslogtreecommitdiff
path: root/src/codegen/llvm.zig
diff options
context:
space:
mode:
authorr00ster91 <r00ster91@proton.me>2023-07-21 03:22:59 +0200
committerwooster0 <wooster0@proton.me>2024-05-14 01:13:49 +0900
commit9ae43567a3ef14a815482ccaa2a5b412a716743e (patch)
treecdd535a650d7fdde5eb6c43e1d8e2b040fee5366 /src/codegen/llvm.zig
parent8579904ddd489b73cb61721c31b9e9c14ed9e264 (diff)
downloadzig-9ae43567a3ef14a815482ccaa2a5b412a716743e.tar.gz
zig-9ae43567a3ef14a815482ccaa2a5b412a716743e.zip
Sema: improve error set/union discard/ignore errors
Previously the error had a note suggesting to use `try`, `catch`, or `if`, even for error sets where none of those work. Instead, in case of an error set the way you can handle the error depends very much on the specific case. For example you might be in a `catch` where you are discarding or ignoring the error set capture value, in which case one way to handle the error might be to `return` the error. So, in that case, we do not attach that error note. Additionally, this makes the error tell you what kind of an error it is: is it an error set or an error union? This distinction is very relevant in how to handle the error.
Diffstat (limited to 'src/codegen/llvm.zig')
0 files changed, 0 insertions, 0 deletions