mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Make sure stack traces are logged for CoreExceptions
Change-Id: I4686473c8925c241f16a79892382359829ec1625
This commit is contained in:
parent
c4990122ac
commit
8286a3e2d4
1 changed files with 9 additions and 1 deletions
|
@ -1542,7 +1542,15 @@ public class CCorePlugin extends Plugin {
|
|||
*/
|
||||
public static void log(Throwable e) {
|
||||
if (e instanceof CoreException) {
|
||||
log(((CoreException) e).getStatus());
|
||||
// If the CoreException doesn't have a nested exception, wrap it
|
||||
// into another Status object. This ensures that we can see its
|
||||
// stack trace.
|
||||
IStatus status = ((CoreException) e).getStatus();
|
||||
if (status.getException() != null) {
|
||||
log(status);
|
||||
} else {
|
||||
log(createStatus("Error", e)); //$NON-NLS-1$
|
||||
}
|
||||
} else {
|
||||
String msg = e.getMessage();
|
||||
if (msg == null) {
|
||||
|
|
Loading…
Add table
Reference in a new issue