[Feature request] User-specified non-fatal errors
- Dominant language
- C++
- Stars
- 1.6k
- Forks
- 193
- Avg merge
- 20h 32m
- Merged PRs (30d)
- 29
Description
This is the current state of RGBASM warning/error creation:
| | Warning | Non-fatal error | Fatal error |
| --- | --- | --- | --- |
| **Description** | Finishes and assembles | Finishes, does not assemble | Exits, does not finish or assemble |
| **Assertion** | `assert warn, [, ]` | `assert fail, [, ]`
or just
`assert [, ]` | `assert fatal, [, ]` |
| **User-created** | `warn ` | *N/A* | `fail ` |
I'd like a way to trigger user-specified non-fatal errors, without the workaround of doing `static_assert fail, 0, "message"` (which prints "`error: Assertion failed: message`" instead of just "`error: message`"). It also bothers me that "`fail`" means a non-fatal error in "`assert fail`" but a fatal error on its own.
How about if we change `fail "message"` to be a non-fatal error, and add `fatal "message"` as a fatal one?
Contributor guide
Research direction
Start with RGBASM's existing handling of `warn`, `fail`, `fatal`, and the `assert fail`/`assert fatal` forms, comparing their documented outcomes in the issue's table. Done means user-created `fail "message"` produces a non-fatal error, `fatal "message"` produces a fatal error, and the assertion forms retain their stated behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100