Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print to stderr when there is an exception #763

Merged
merged 16 commits into from
Dec 26, 2023
Merged

Print to stderr when there is an exception #763

merged 16 commits into from
Dec 26, 2023

Conversation

JoseBritto
Copy link
Member

This PR should add logs in missed places.

@JoseBritto
Copy link
Member Author

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

@nlogozzo
Copy link
Member

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

@JoseBritto
Copy link
Member Author

JoseBritto commented Dec 25, 2023

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
Copy link
Member

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
Copy link
Member Author

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
Copy link
Member Author

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

GNOME: MainWindowController - Fix formatting
@JoseBritto JoseBritto marked this pull request as ready for review December 26, 2023 22:34
@JoseBritto
Copy link
Member Author

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

@JoseBritto JoseBritto changed the title Print to stdout when there is an exception Print to stderr when there is an exception Dec 26, 2023
NickvisionMoney.GNOME/Views/AccountView.cs Outdated Show resolved Hide resolved
NickvisionMoney.GNOME/Views/AccountView.cs Outdated Show resolved Hide resolved
NickvisionMoney.GNOME/Views/NewAccountDialog.cs Outdated Show resolved Hide resolved
@JoseBritto
Copy link
Member Author

Idk why rider keeps adding these in

@JoseBritto JoseBritto requested a review from nlogozzo December 26, 2023 22:46
Copy link
Member

@nlogozzo nlogozzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@nlogozzo nlogozzo merged commit f0f48eb into main Dec 26, 2023
@JoseBritto JoseBritto deleted the more-logs branch December 27, 2023 21:19
@nlogozzo nlogozzo added this to the V2024.1.0 milestone Jan 5, 2024
@nlogozzo
Copy link
Member

nlogozzo commented Jan 5, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants