Closed freewind closed 13 years ago
Can you explain how you would invoke a missing action in the templates?
2011/9/27 freewind < reply@reply.github.com>
If I invoked an missing action in the template, the error message will be:
Execution exception
RuntimeException occured : error in running the renderer: No route found In /app/controllers/Pages.java (around line 39)
35: } 36: 37: public static void show(Long id) { 38: Page page = Page.findById(id); 39: renderJapid(page); 40: } 41: }
But from the message, I don't know which one is missing, it's not easy to look for it in the template.
I think it's better to provide the action name and the line number of template in the error message.
Reply to this email directly or view it on GitHub: https://github.com/branaway/Japid/issues/37
I just updated the issue, make it clearer.
the new version, 0.8.9.8, has a better error message. still not ideal, since it shows the lines in the generated Java code, instead of the original template file.
0.8.10 has enhanced template runtime errors quite a bit. The error is mapped to the original template. A lot informative. All templates must be recompiled with japid:regen
In my template, I have this code:
which "Pages.xxx" in not existed. When I refresh the browser, it will report this error message:
But from the message, I can't find any information about the "Pages.xxx", it's not easy to look for it in the template.
I think it's better to provide the action name and the line number of template in the error message.