cryptic error message

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

cryptic error message

Leos Literak
Hi,

if nonexisting variable is used as parameter of method call,
such error is displayed:

No signature of method xpath matches (java.lang.Object,java.lang.String)
The problematic instruction:
----------
==> if TOOL.xpath(ITEM,"/data/birthNumber")?exists [on line 10, column 9
in web/show/author.ftl]
----------

Would you guess, that I renamed ITEM to AUTHOR and forgot to replace
it in freemarker too? This is freemarker 2.3.3.

Sincerelly

Leos


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
FreeMarker-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-devel
Reply | Threaded
Open this post in threaded view
|

Re: cryptic error message

Attila Szegedi
Hm... This is unfortunately a tradeoff situation:

Pick one:
1) Having better error message ("ITEM is undefined at...")
2) Being able to pass null to Java methods

This tradeoff is supposedly resolved in 2.4 with its concept of JAVA_NULL,  
but in 2.3.x this can't get better, unfortunately.

Attila.

--
home: http://www.szegedi.org
weblog: http://constc.blogspot.com

On Sun, 03 Dec 2006 16:05:47 +0100, Leos Literak <[hidden email]>  
wrote:

> Hi,
>
> if nonexisting variable is used as parameter of method call,
> such error is displayed:
>
> No signature of method xpath matches (java.lang.Object,java.lang.String)
> The problematic instruction:
> ----------
> ==> if TOOL.xpath(ITEM,"/data/birthNumber")?exists [on line 10, column 9
> in web/show/author.ftl]
> ----------
>
> Would you guess, that I renamed ITEM to AUTHOR and forgot to replace
> it in freemarker too? This is freemarker 2.3.3.
>
> Sincerelly
>
> Leos

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
FreeMarker-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-devel
Reply | Threaded
Open this post in threaded view
|

Re: cryptic error message

Leos Literak
Attila Szegedi napsal(a):
> Hm... This is unfortunately a tradeoff situation:
>
> Pick one:
> 1) Having better error message ("ITEM is undefined at...")
> 2) Being able to pass null to Java methods
>
> This tradeoff is supposedly resolved in 2.4 with its concept of JAVA_NULL,  
> but in 2.3.x this can't get better, unfortunately.

I see. At least we have a solution for next major release.

Leos


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
FreeMarker-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-devel