Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] e.getCause() missing in ConditionalProcessGroup and TemplateProcessHandler

> Please let me know when the migration to GitHub (which is a great step!) is complete so I can register this new issue and possibly contribute a patch.

Will do - I am going to provide an update on cdt-dev soon on timing.

Jonah

~~~
Jonah Graham
Kichwa Coders
www.kichwacoders.com


On Tue, 19 Jul 2022 at 15:49, Liviu Ionescu <ilg@xxxxxxxxxx> wrote:
While working on the new Embed CDT templates, I encountered a bug inĀ ConditionalProcessGroup, causing the loss of the initial exception cause.


The code reads:

```
} catch (ProcessFailureException e) {
throw new ProcessFailureException(e.getMessage(), e, statuses);
}
```

Instead, it should read:

```
} catch (ProcessFailureException e) {
throw new ProcessFailureException(e.getMessage(), e.getCause(), statuses);
}
```

The result is that the window displaying the message no longer shows the exception cause, but doubles the message, looking like:

```
xyz
Reason:
xyz
```

There are two such cases (search for '(e.getMessage(), e,' in core/org.eclipse.cdt.core/templateengine), and both need similar fixes.

My (poor) workaround was to no longer pass my own error message, but the original exception cause, which is also shown twice, but at least I have an error indication:




If I remember right, the problem is very old, which also means it has a low priority, but it would be nice to fix it in the next release.

Please let me know when the migration to GitHub (which is a great step!) is complete so I can register this new issue and possibly contribute a patch.


Regards,

Liviu
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/cdt-dev

Back to the top