mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
use new exit() everywhere
This commit is contained in:
@@ -33,7 +33,8 @@ fn (f mut Fetcher) fetch() {
|
||||
f.mu.unlock()
|
||||
resp := http.get('https://hacker-news.firebaseio.com/v0/item/${id}.json')
|
||||
story := json.decode(Story, resp) or {
|
||||
exit('failed to decode a story')
|
||||
println('failed to decode a story')
|
||||
exit(1)
|
||||
}
|
||||
println('#$f.cursor) $story.title')
|
||||
}
|
||||
|
Reference in New Issue
Block a user