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

Avoid throwing errors #954

Open
j4k0xb opened this issue Jan 3, 2024 · 0 comments
Open

Avoid throwing errors #954

j4k0xb opened this issue Jan 3, 2024 · 0 comments

Comments

@j4k0xb
Copy link

j4k0xb commented Jan 3, 2024

When debugging a web worker script with Pause on caught exceptions enabled it's quite distracting that the debug package throws every time and I have to press continue
image

I'd appreciate if it instead uses a more defensive approach:

  • if (exports.storage):

    debug/src/browser.js

    Lines 198 to 200 in f66cb2d

    try {
    if (namespaces) {
    exports.storage.setItem('debug', namespaces);

    debug/src/browser.js

    Lines 218 to 219 in f66cb2d

    try {
    r = exports.storage.getItem('debug');
  • if (typeof localStorage !== 'undefined')

    debug/src/browser.js

    Lines 245 to 248 in f66cb2d

    try {
    // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
    // The Browser also has localStorage in the global context.
    return localStorage;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant