1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

better C error message

This commit is contained in:
Alexander Medvednikov 2019-07-31 07:16:18 +02:00
parent 6294c7878e
commit a4882f1955

View File

@ -813,8 +813,14 @@ mut args := ''
if res.contains('error: ') {
if v.pref.is_debug {
println(res)
} else {
print(res.limit(200))
if res.len > 200 {
println('...\n(Use `v -debug` to print the entire error message)\n')
}
}
panic('C error. This should never happen. Please create a GitHub issue.')
panic('C error. This should never happen. ' +
'Please create a GitHub issue: https://github.com/vlang/v/issues/new/choose')
}
// Link it if we are cross compiling and need an executable
if v.os == .linux && !linux_host && v.pref.build_mode != .build {