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

Switch from wstring errors to stacktrace exceptions #11

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

wolfreak99
Copy link
Owner

Throughout the code there were various try/catch instances that returned wstrings and showed those errors as messages. I don't like this approach, as it doesn't report much evidence to work with, such as where the error originated at or what all functions were executed to retrieve errors.

This is an attempt at making them provide more information by switching from wstring based errors (where possible) over to a stacktrace exception I found at https://sourceforge.net/projects/stacktrace/

By "Where possible", there is still an instance in bootstrapper.cpp which uses a wstring because void try_loading uses __try and doesn't allow unwinding, so that still throws wstrings, but void bootstrapper::load_local_implicit_params now handles this by catching the wstring and throwing a stack_runtime_error from there.

I have also yet to go through and replace the various non-trycatch-based error messages throughout the code, such as in main.cpp, etc, and I have yet to use/create more than just stack_runtime_error. I intend to do these things, but as of now, this is a quick address to help investigate #8 while I work on some other much needed stuff, such as an improved about window, changelog, version number plan, etc.

@wolfreak99 wolfreak99 force-pushed the wolfreak99/exception_class branch from 46bc099 to cb43842 Compare July 28, 2017 19:08
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.

1 participant