CSHS-CWRA / RavenHydroFramework

repository for the Raven Hydrological Modelling Framework developed at the University of Waterloo
Artistic License 2.0
18 stars 8 forks source link

Report error codes to `stderr` #34

Closed Zeitsperre closed 1 month ago

Zeitsperre commented 2 months ago

Addressing a Problem?

When I try to determine whether Raven was successfully run, I have to manually read and parse the output. This doesn't really help when performing tests from Python or on CI.

Additionally, for terminal messages that aren't errors, the message should not loudly say Error Code as this is confusing to users (related issue #25).

Potential Solution

For error codes that denote failure of the program (runtime or user errors), the message should be sent to stderr instead of stdout.

Additional context

https://www.systutorials.com/how-to-print-a-line-to-stderr-and-stdout-in-c-2/

Contribution

analytophile commented 1 month ago

done in newest update.