https://issues.apache.org/ooo/show_bug.cgi?id=125105
Issue ID: 125105
Issue Type: DEFECT
Summary: Throw C++ exceptions by value
Product: General
Version: OOo 3.3 or older
Hardware: All
OS: All
Status: CONFIRMED
Severity: major
Priority: P3
Component: help
Assignee: [email protected]
Reporter: [email protected]
Depends on: 122768
Blocks: 122766
Best practices for C++ suggest to catch exceptions by value. The related issue
to catch exceptions by a const reference has already been addressed in issue
122768.
The AOO code base contains a lot of instances where exception objects are
thrown with code patterns like
throw new RuntimeException()
where the surrounding and catching code doesn't seem to handle that a pointer
is being thrown instead of an exception. So the exception might not be caught.
If the (now deprecated) throw lists come into play and if they specify the
exception itself but not the pointer then this can cause pseudo-crashes because
C++ requires that terminate() is being called.
So the existing code with "throw new X()" should be changed to "throw X()" and
the related throw-lists and catch clauses should be checked.
--
You are receiving this mail because:
You are the assignee for the issue.
You are watching all issue changes.