-
Notifications
You must be signed in to change notification settings - Fork 321
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
Source Map dosen't work in some scenarios. Possible fix. #159
Comments
I'm not that familiar with the workings of the ErrorMapper. The current set-up bundles everything into Do you have any test code to reproduce the referenced stack trace? What is your project structure, is everything bundled? Are you getting any output from the ErrorMapper? |
Thanks for the reproducible instructions. I'll take a look at your
suggestion for fixing it.
…On Thu, 19 Aug 2021, 07:27 Akshay.L.Aradhya, ***@***.***> wrote:
Okay I was able to reproduce it.
I change my core loop to the following one line code :
export const loop = ErrorMapper.wrapLoop(() => {
// @ts-ignore
Game.creeps.Attacker_2179.pos.inRangeTo(undefined, 4);});
I added a line to errorMapper to also printed out the original stack trace
(coloured white in the below image)
else {
console.log(`<span style='color:#ff4444'>${this.sourceMappedStackTrace(e)}</span>`);
console.log(e.stack);}
Here is the console output :
[image: image]
<https://user-images.githubusercontent.com/6565924/130007445-eb8578e1-dac4-4bc7-b73d-ea170dc0e616.png>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#159 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACQMB3CUJYJD3B6TBYLGHDT5SBZ7ANCNFSM5CF7K5UQ>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Testcase :
I think if you take a look at the error
ErrorMapper.ts
at this line you are checking if it is coming from themain
file and breaking. Sometimes the first match doesn't necessarily come frommain
as seen in the above stack trace.The possible solution for this was to remove the corresponding else block. While this solves this case I'm not sure if it is a general solution.
The text was updated successfully, but these errors were encountered: