Skip to content

Commit

Permalink
Improved error measages when options misconfigured.
Browse files Browse the repository at this point in the history
  • Loading branch information
karolkolodziej committed May 14, 2024
1 parent 33244c1 commit 86de0c7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ts/Dashboards/Board.ts
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,7 @@ namespace Board {
return Serializable
.fromJSON(JSON.parse(dashboardJSON)) as Board;
} catch (e) {
// Nothing to do
throw new Error(`${e}`);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -672,10 +672,9 @@ class HighchartsComponent extends Component {
);
}
return new Factory(this.chartContainer, this.chartOptions);
} catch {
} catch (e) {
throw new Error(
'The Highcharts component is misconfigured: `' +
this.cell.id + '`'
`The Highcharts component in cell '${this.cell.id}' is misconfigured. \n____________\n${e}`
);
}
}
Expand Down
3 changes: 1 addition & 2 deletions ts/Dashboards/EditMode/AccordionMenu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ class AccordionMenu {
} catch (e) {
// TODO: Handle the wrong config passed from the user.
error(
'Dashboards Error: Wrong JSON config structure passed as' +
' a chart options.'
`Dashboards Error: Wrong JSON config structure passed as a chart options. \n____________\n${e}`
);
}

Expand Down

0 comments on commit 86de0c7

Please sign in to comment.