FarmData2 / FarmData2

Main development repository for the FarmData2 Drupal module.
Other
1 stars 9 forks source link

farmosUtil.js: resolve inconsistency in error logging in functions #234

Open braughtg opened 1 month ago

braughtg commented 1 month ago

Some of the functions catch errors, print information to the console and then throw the error, while others do not catch and print any information. E.g. see getPlantAsset vs deletePlantAsset. This inconsistency should be resolved by simply allowing any errors that are thrown by the operation to propagate up to where they can be better handled in more context sensitive ways (e.g. lib.js can print error messages).

Note: the logging in runTransaction should remain in place.

All existing unit and e2e tests should still pass after this change.