-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
bugSomething isn't workingSomething isn't workinglang:javascriptIssues relating to JavaScriptIssues relating to JavaScriptmodule:cliCLI module issues and featuresCLI module issues and features
Description
Expected Behavior
When an error occurs during JavaScript/TypeScript execution, the error marker should always be on the line where the error was thrown.
Actual Behaviour
In some cases, the marker will appear on an unrelated line, hiding the actual problem location.
Stacktrace
No response
Steps To Reproduce
Given the following JS source file:
// my-script.js
const http = require("http");
const port = 8000;
http.createServer() // fails because HTTP is not implemented (expected for demo purposes)
Calling elide run ./my-script.js
will show the line const port = 8000;
as the error location:
║ 1┊ const http = require("http");
║ 2┊
✗ 3┊ const port = 8000;
╟────────────────────────────────────────────────
║ TypeError: invokeMember (createServer) on elide.runtime.node.http.NodeHttp@62a19df6 failed due to: Unknown ide ... ║
Notably, the issue does not appear when an error is thrown manually from JavaScript code (e.g. throw new Error(...)
), only when a host exception surfaces.
Environment Information
No response
Runtime
Native
Language
JavaScript
Example Application
No response
Version
1.0.0-beta8
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinglang:javascriptIssues relating to JavaScriptIssues relating to JavaScriptmodule:cliCLI module issues and featuresCLI module issues and features