Merge lp:~alecu/unity-scope-click/fix-empty-variant into lp:unity-scope-click
| Status: | Merged |
|---|---|
| Approved by: | Alejandro J. Cura on 2015-01-14 |
| Approved revision: | 304 |
| Merged at revision: | 304 |
| Proposed branch: | lp:~alecu/unity-scope-click/fix-empty-variant |
| Merge into: | lp:unity-scope-click |
| Diff against target: |
198 lines (+76/-8) 5 files modified
libclickscope/click/index.h (+1/-0) libclickscope/click/preview.cpp (+22/-6) libclickscope/click/preview.h (+1/-0) libclickscope/click/reviews.h (+2/-1) libclickscope/tests/test_preview.cpp (+50/-1) |
| To merge this branch: | bzr merge lp:~alecu/unity-scope-click/fix-empty-variant |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Michi Henning (community) | Approve on 2015-01-14 | ||
| PS Jenkins bot | continuous-integration | Approve on 2015-01-14 | |
| dobey (community) | 2015-01-13 | Approve on 2015-01-13 | |
|
Review via email:
|
|||
Commit Message
Check Variant for null value
| Michi Henning (michihenning) wrote : | # |
Thanks for the fix, thanks!
I'm wondering about a more general issue here though. Basically, what happens is that, during destruction of an object, an exception is thrown, which brings down the process. I take it that this is simply the destruction of an object that is used by the scope internally?
As best as I know, any methods that are called by the scopes run time are exception-safe so, if scope throws an exception from anything that is called by the run time, things should be safe. If this is not the case, and the object is being destroyed within the context of a thread that is owned by the run time, I need to know so I can fix it :-)
In general, whenever I have a non-trivial destructor, I have a try-catch block around the code that, if an exception is thrown, logs the exception. If the program is no longer in a sane state after that, I call abort(). Something like:
SomeObject:
{
try
{
}
catch (std::exception const& e)
{
// call abort() here if it's not possible to recover.
}
catch (...)
{
// call abort() here if it's not possible to recover.
}
}
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:304
http://
Executed test runs:
UNSTABLE: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
UNSTABLE: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild:
http://

Looks ok.