I have a struct which contains an internal Logger – should functions still return errors?

Written by
Link to Post


As per title, I have a simple struct that write a log to a file for updating internal status of various things. If an error occurs during this process should the function running the code return an error, or is it kosher to handle this logging internally and just return a boolean on whether the function was successful or not? The error isn’t really important outside of this function

submitted by /u/sc3nner
[link] [comments]

Article Tags:
· ·
Article Categories:

Leave a Reply