tristan-sebens / metl

An R package developed by and for the AFSC MESA group for extracting and standardizing data from telemetry tags.
GNU General Public License v3.0
0 stars 0 forks source link

better error explanations #107

Closed kechave closed 1 week ago

kechave commented 3 weeks ago

Not sure if this possible, but some explanation for certain errors would be super helpful. For example - 1) tag does not exist in database, etc....

tristan-sebens commented 1 week ago

Our ability to implement this is limited, as the constraints are implemented by the DB, but errors are handled by the R process, and the degree to which they talk to eachother is limited. However, I was able to find a decent solution by changing the way that the R code displays the errors which are sent back by the DB, such that the name of the constraint which was violated becomes visible. I then renamed all of the constraints to more meaningful and descriptive names. Now when a DB constraint is violated, it looks something like this:

Image

Which provides substantially more information to the user about the nature of the error. Hopefully this helps things.