Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325913 - [acceleo] show line numbers of current position in template file
Summary: [acceleo] show line numbers of current position in template file
Status: CLOSED FIXED
Alias: None
Product: Acceleo
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 enhancement
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-21 20:01 EDT by Simon harrer CLA
Modified: 2011-01-25 10:21 EST (History)
1 user (show)

See Also:


Attachments
Exception log (12.89 KB, text/plain)
2010-09-22 07:04 EDT, Simon harrer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon harrer CLA 2010-09-21 20:01:02 EDT
Build Identifier: 20100617-1415

Sometimes, there is no possibility to debug the code. Therefore, it would be great to have a more informative stack trace indicating in what line from which file the execution resulted in an error. This would help immensly. 

Reproducible: Always
Comment 1 Laurent Goubet CLA 2010-09-22 02:17:31 EDT
Hi Simon,

We already provide stack traces relative to the Acceleo templates. Did you stumble on an exception were we do not? Could you elaborate on the type of error for which we should provide more informative stack traces?
Comment 2 Simon harrer CLA 2010-09-22 07:04:03 EDT
Created attachment 179367 [details]
Exception log

Exception log which shows that no line number is shown during execution. 

However, this looks like it is a duplication of bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=290532
Comment 3 Laurent Goubet CLA 2010-09-22 07:15:17 EDT
Simon,

The exception itself is a duplicate ... but what you want isn't.

We provide "custom" exceptions with template-relative stack traces when the issue is "expected" : an Acceleo "for" loop with nothing to iterate over, an Acceleo "if" with a condition which is not a boolean ...

Yet when something unexpected comes up (such as a NullPointerException), we simply log the exception as it is without altering its stack trace to make it more "user-friendly".

This is an enhancement that could be made rather easily, I believe it will show up in the Indigo M3 (3.1.0M3) build due the ninth of November.
Comment 4 Laurent Goubet CLA 2011-01-25 10:21:48 EST
From 3.1.0M5 onward, RuntimeExceptions halting the evaluation of Acceleo modules are wrapped in custom exceptions providing both the "Acceleo specific" trace and the "Standard Java" trace.