NickvisionApps / Denaro

Manage your personal finances
https://flathub.org/apps/details/org.nickvision.money
MIT License
584 stars 38 forks source link

Print to stderr when there is an exception #763

Closed JoseBritto closed 11 months ago

JoseBritto commented 11 months ago

This PR should add logs in missed places.

JoseBritto commented 11 months ago

Now this is just to make debugging for #762 a tiny bit easier. Will go through and complete the PR by tuesday :)

nlogozzo commented 11 months ago

Might be best to Ctrl+Shift+F for catch and add and print the exception where needed...

JoseBritto commented 11 months ago

Might be best to Ctrl+Shift+F for catch and add and print the exception where needed...

Alright! Also probably better to use Console.Error. I forgot that earlier

nlogozzo commented 11 months ago

Console.WriteLine is probably fine...stdput and stderr point to the same terminal unless the programmer usually redirects it to a separate file which we don't really in this case...

JoseBritto commented 11 months ago

Console.WriteLine is probably fine...stdput and stderr point to the same terminal unless the programmer usually redirects it to a separate file which we don't really in this case...

It is actually two different streams but most terminals won't differentiate by default. Its standard thing for most programs to print use the correct output stream. Also users can manually redirect errors as well to a file or whatever. Since Denaro isn't a command line app, it probably doesn't really matter. Since I'm gonna have to go through everything anyway, might as well fix the few logs already being printed out.

JoseBritto commented 11 months ago

I'll complete this in the afternoon. Have been a bit busy

JoseBritto commented 11 months ago

Added Console.Error.WriteLine to most catch blocks that made sense to me. I ignored the ones that executed sql queries and such.

JoseBritto commented 11 months ago

Idk why rider keeps adding these in

nlogozzo commented 10 months ago

https://github.com/NickvisionApps/Denaro/releases/tag/2024.1.0