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

Convert console.warn() messages to Errors #964

Open
etowahadams opened this issue Aug 25, 2023 · 0 comments
Open

Convert console.warn() messages to Errors #964

etowahadams opened this issue Aug 25, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@etowahadams
Copy link
Contributor

Currently, there are many places within Gosling where when an error occurs, it is just logged to the console.

For example:

if (!spec.width || !spec.height) {
console.warn('Size of a track is not properly determined, so visual mark cannot be rendered');
return;

if (Number.isNaN(x) || Number.isNaN(z)) {
console.warn('Invalid tile zoom or position:', z, x);
continue;

Some of these may be appropriate to leave as console warnings, but probably many of these should throw some Error instead, which can be caught at the top level so that other applications that use Gosling can more easily access them.

@etowahadams etowahadams added the enhancement New feature or request label Aug 25, 2023
@sehilyi sehilyi added the good first issue Good for newcomers label Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants