CC: | "Claes Jakobsson" <claesjac [...] cpan.org> |
Subject: | "this can't happen" happens just too often |
Date: | Mon, 17 Sep 2007 16:54:12 +0800 |
To: | bug-javascript [...] rt.cpan.org |
From: | "Agent Zhang" <agentzh [...] gmail.com> |
Hi, Claes
I'm writing something big atop this module (integrating HTML::DOM into
JS). First of all I must say JavaScript.pm is really a great module;
thank you for your excellent work ;)
However, I just get the following error too often today:
"this can't happen."
I'd expect if JavaScript.xs fails to convert a JS object to a Perl
hash, it should simply convert it to a string (by calling the JS obj's
toString method or some such).
Also, it seems to me, calling die in Perl callbacks also triggers this
error message, for example:
$context->bind_function('die' => sub { die "@_" });
I'd expect it to propagate the Perl exception instead of simply
ignoring the detailed message and giving a helpless "this can't
happen" hint.
Currently I have to use "warn" everywhere in my Perl callbacks :(
Hopefully these will get fixed soon :)
Thanks!
agentz