[
http://jira.magnolia.info/browse/MGNLSCRSH-6?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gregory Joseph updated MGNLSCRSH-6:
-----------------------------------
Description:
I'm getting the following exception when executing a simple script (see below),
and nothing tells me where the problem actually is, unless i plug my debugger
in. I suspect the {{if (error instanceof bsh.EvalError) }} block in
ShellServlet isn't accurate, because the instance of ParseException (being a
subclass of EvalError) actually knows where the error is my script.
{noformat}
java.lang.NullPointerException
at bsh.ParseException.getErrorLineNumber(Unknown Source)
at
info.magnolia.module.shell.ShellServlet.formatScriptResultHTML(ShellServlet.java:204)
at
info.magnolia.module.shell.ShellServlet.sendHTML(ShellServlet.java:173)
at info.magnolia.module.shell.ShellServlet.doGet(ShellServlet.java:132)
{noformat}
For the record, the script I'm trying to execute - which probably has an error
somewhere :D
{noformat}
import info.magnolia.module.admininterface.pages.DevelopmentUtilsPage;
DevelopmentUtilsPage p = new DevelopmentUtilsPage("pouet", null, null);
p.setRootdir("/Users/gjoseph/tmp/exports")
p.backupChildren("config", "/modules/baukasten/templates");
{noformat}
(indeed a stupid error, missing a {{;}} on line #5 :D)
was:
I'm getting the following exception when executing a simple script (see below),
and nothing tells me where the problem actually is, unless i plug my debugger
in. I suspect the {{if (error instanceof bsh.EvalError) }} block in
ShellServlet isn't accurate, because the instance of ParseException (being a
subclass of EvalError) actually knows where the error is my script.
{noformat}
java.lang.NullPointerException
at bsh.ParseException.getErrorLineNumber(Unknown Source)
at
info.magnolia.module.shell.ShellServlet.formatScriptResultHTML(ShellServlet.java:204)
at
info.magnolia.module.shell.ShellServlet.sendHTML(ShellServlet.java:173)
at info.magnolia.module.shell.ShellServlet.doGet(ShellServlet.java:132)
{noformat}
For the record, the script I'm trying to execute - which probably has an error
somewhere :D
{noformat}
import info.magnolia.module.admininterface.pages.DevelopmentUtilsPage;
DevelopmentUtilsPage p = new DevelopmentUtilsPage("pouet", null, null);
p.setRootdir("/Users/gjoseph/tmp/exports")
p.backupChildren("config", "/modules/baukasten/templates");
{noformat}
> Can't display error messages properly
> -------------------------------------
>
> Key: MGNLSCRSH-6
> URL: http://jira.magnolia.info/browse/MGNLSCRSH-6
> Project: Magnolia Shell Module
> Issue Type: Bug
> Reporter: Gregory Joseph
> Assignee: Philipp Bracher
> Fix For: 1.0.1
>
>
> I'm getting the following exception when executing a simple script (see
> below), and nothing tells me where the problem actually is, unless i plug my
> debugger in. I suspect the {{if (error instanceof bsh.EvalError) }} block in
> ShellServlet isn't accurate, because the instance of ParseException (being a
> subclass of EvalError) actually knows where the error is my script.
> {noformat}
> java.lang.NullPointerException
> at bsh.ParseException.getErrorLineNumber(Unknown Source)
> at
> info.magnolia.module.shell.ShellServlet.formatScriptResultHTML(ShellServlet.java:204)
> at
> info.magnolia.module.shell.ShellServlet.sendHTML(ShellServlet.java:173)
> at info.magnolia.module.shell.ShellServlet.doGet(ShellServlet.java:132)
> {noformat}
> For the record, the script I'm trying to execute - which probably has an
> error somewhere :D
> {noformat}
> import info.magnolia.module.admininterface.pages.DevelopmentUtilsPage;
> DevelopmentUtilsPage p = new DevelopmentUtilsPage("pouet", null, null);
> p.setRootdir("/Users/gjoseph/tmp/exports")
> p.backupChildren("config", "/modules/baukasten/templates");
> {noformat}
> (indeed a stupid error, missing a {{;}} on line #5 :D)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia.info/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/
----------------------------------------------------------------