mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cc.v: fix C error message
This commit is contained in:
parent
436603aa44
commit
2cd24ea722
@ -339,13 +339,17 @@ start:
|
|||||||
println(res.output)
|
println(res.output)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
partial_output := res.output[res.output.len-200..res.output.len].trim_right('\r\n')
|
if res.output.len < 30 {
|
||||||
|
println(res.output.len)
|
||||||
|
} else {
|
||||||
|
max := 50
|
||||||
|
n := if res.output.len > 50 { 50 } else { res.output.len }
|
||||||
|
|
||||||
|
partial_output := res.output[res.output.len-n..].trim_right('\r\n')
|
||||||
print(partial_output)
|
print(partial_output)
|
||||||
if res.output.len > partial_output.len {
|
if n < 50 {
|
||||||
println('...\n(Use `v -g` to print the entire error message)\n')
|
println('...\n(Use `v -cg` to print the entire error message)\n')
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
println('')
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
verror('C error. This should never happen. ' + '\nPlease create a GitHub issue: https://github.com/vlang/v/issues/new/choose')
|
verror('C error. This should never happen. ' + '\nPlease create a GitHub issue: https://github.com/vlang/v/issues/new/choose')
|
||||||
|
Loading…
Reference in New Issue
Block a user