mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
log: mark log.fatal as [noreturn]
(#16129)
This commit is contained in:
parent
51f4d99399
commit
c684dd8c9b
3 changed files with 12 additions and 2 deletions
|
@ -179,6 +179,7 @@ pub fn (mut l Log) send_output(s &string, level Level) {
|
|||
|
||||
// fatal logs line `s` via `send_output` if `Log.level` is greater than or equal to the `Level.fatal` category.
|
||||
// Note that this method performs a panic at the end, even if log level is not enabled.
|
||||
[noreturn]
|
||||
pub fn (mut l Log) fatal(s string) {
|
||||
if int(l.level) >= int(Level.fatal) {
|
||||
l.send_output(s, .fatal)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue