Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

[FEATURE] Add "real" traceback #13

Open
Tracked by #10
ElBe-Plaq opened this issue Mar 28, 2023 · 4 comments
Open
Tracked by #10

[FEATURE] Add "real" traceback #13

ElBe-Plaq opened this issue Mar 28, 2023 · 4 comments
Assignees
Labels
Enhancement Enhances something already existing. Feature request Request for a new feature.

Comments

@ElBe-Plaq
Copy link
Member

Is your feature request related to a problem? Please describe.
When an error occurs, you don't have a great way to find, which part of the code produced it.

Describe the solution you'd like
Good looking, maybe even colored Traceback, like in python or C.

Describe alternatives you've considered
Keep it as it is and look up the code for yourself. (Line number and column get printed as usual)

@ElBe-Plaq ElBe-Plaq added Enhancement Enhances something already existing. Feature request Request for a new feature. labels Mar 28, 2023
@ElBe-Plaq ElBe-Plaq added this to the Release Beta v0.0.9 milestone Mar 28, 2023
This was referenced Mar 28, 2023
@ElBe-Plaq
Copy link
Member Author

What about something like this:

Error: Division by zero, in line 0, column 0.
Division by zero is not allowed.

1 / 0.00000
     ^~~~~

@ElBe-Plaq
Copy link
Member Author

Or more like the python style:

Traceback (most recent call last):
  File "example.ilang", in line 2, column 4
     1 / this_is_zero
          ^^^^^^^
  File "example.ilang", in line 1, column 20
    var this_is_zero = 0
Division by zero: Dividing by zero is not allowed.

@ElBe-Plaq
Copy link
Member Author

The arrows are not formatted properly, because of my browsers font.

@ElBe-Plaq
Copy link
Member Author

I'll go with the second one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Enhancement Enhances something already existing. Feature request Request for a new feature.
Projects
No open projects
Status: Todo
Status: 0.0.10
Development

No branches or pull requests

2 participants