Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Improved Error messages #50

Open
tcdude opened this issue Aug 3, 2023 · 0 comments
Open

Feature Request: Improved Error messages #50

tcdude opened this issue Aug 3, 2023 · 0 comments

Comments

@tcdude
Copy link
Contributor

tcdude commented Aug 3, 2023

Whenever an error happens in kmake, the resulting error message doesn't include the offending kfile.js + line number that caused the error.

One typically gets an error along these lines:

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received null
    at new NodeError (node:internal/errors:372:5)
    at validateString (node:internal/validators:119:11)
    at Object.resolve (node:path:167:9)
    at node:kmake/Project:106:45
    at new Promise (<anonymous>)
    at loadProject (node:kmake/Project:73:12)
    at Project.addProject (node:kmake/Project:663:31)
    at eval (eval at <anonymous> (node:kmake/Project:109:27), <anonymous>:15:35)
    at node:kmake/Project:109:278
    at new Promise (<anonymous>) {
  code: 'ERR_INVALID_ARG_TYPE'
}
Error: kfile did not call resolve, no project created.
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^

The error shows where it happens in kmake, but it originates as anonymous promise which makes it hard to determine where it originated in my kfile.js

The requested feature would ideally show the respective kfile.js + line number that triggered the exception. Not sure if it is even possible, but any approximation would already be a big improvement imho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant