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

Add error catching? #6

Open
it-s opened this issue Sep 9, 2013 · 1 comment
Open

Add error catching? #6

it-s opened this issue Sep 9, 2013 · 1 comment
Assignees
Labels

Comments

@it-s
Copy link
Owner

it-s commented Sep 9, 2013

I have thought about it for some time, and it seems to me that if IM (or Qt) encounters any internal errors app will just crash :(
Can we somehow use try{}catch{} to make sure the errors are at least shown to the user? I have no idea how this works in c++, but it's quite simple in Java.
Maybe you know why this is not a good idea in c++, then tell me please :)
Thanks

@ghost ghost assigned dridk Sep 9, 2013
@dridk
Copy link
Collaborator

dridk commented Sep 10, 2013

That's the problem with C++... You have to test manually ( if a == 0 return 5 /a)
You can also use Q_ASSERT, to show warning on console.
To show warning use :

QMessageBox::information(0, "error", "errorMessage")

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

No branches or pull requests

2 participants