Add column number
This commit is contained in:
parent
19116dcbd0
commit
ac191716d9
@ -76,8 +76,9 @@ void print_error_position(vector<string> history, CodePosition pos) {
|
||||
void print_error_stack_trace(vector<string> history, const RuntimeError& error) {
|
||||
cout << "\n" BOLD "Traceback" RESET " (most recent call last)" << endl;
|
||||
for (StackTraceEntry e : error.trace) {
|
||||
cout << BOLD << setw(4) << setfill(' ')
|
||||
<< get<1>(e).line+1 << RESET BLUE
|
||||
cout << BOLD << setw(8) << setfill(' ')
|
||||
<< to_string(get<1>(e).line+1) + ":" + to_string(get<1>(e).column+1)
|
||||
<< RESET BLUE
|
||||
<< setw(16) << setfill(' ')
|
||||
<< get<0>(e) << RESET << " \t"
|
||||
<< trim(history[get<1>(e).line]) << endl;
|
||||
|
Loading…
Reference in New Issue
Block a user