A NutrientViewer.Error indicates a problem with NutrientViewer. It is a subclass of and behaves like a regular JavaScript error.
try { NutrientViewer.someFunctionThatFails() } catch (error) { error instanceof NutrientViewer.Error // => true error.message // Useful error message } Copy
try { NutrientViewer.someFunctionThatFails() } catch (error) { error instanceof NutrientViewer.Error // => true error.message // Useful error message }
A NutrientViewer.Error indicates a problem with NutrientViewer. It is a subclass of and behaves like a regular JavaScript error.
Example