constellation-app / constellation

A graph-focused data visualisation and interactive analysis application.
https://constellation-app.com
Apache License 2.0
386 stars 58 forks source link

Alter functions in Utility classes to throw exceptions rather than catch #1539

Open antares1470 opened 3 years ago

antares1470 commented 3 years ago

Prerequisites

Description

Utility functions are designed to be able to be used in multiple different situations. Consequently when an exception occurs, the likely trigger for said exception type may differ depending on the situation the function is called in.

In order to allow for these different situations, the exceptions should be thrown from the utility function rather than caught. This leaves the exception handling then to where the function was called, allowing it to be handled more meaningfully with respect to the situation (e.g. a more meaningful error message for users) rather than constructing a generic response (which would need to happen if caught in the utility function itself).

Expected behaviour: All utility functions throw all their exceptions and catch none

Actual behaviour: Some utility functions catch at least one of their exceptions

Reproduces how often: ? (wasn't going to calculate the % of utility functions catching exceptions but there are some in there)

Additional Information

Any additional information, configuration or data that might be necessary to reproduce the issue.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.

github-actions[bot] commented 9 months ago

This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.

github-actions[bot] commented 2 months ago

This issue is stale because it has been open for 6 months with no activity. Consider reviewing and taking an action on this issue.