Closed jstoebel closed 8 years ago
Ok - "Confused END_FINALLY" is Batavia's way of telling you an exception happened somewhere internally. It's the equivalent of Python's problem where an exception gets caught and rethrown, and then you lose the original source of the exception.
It's not going to be trivial to solve, but as long as you've got some perseverance, a can-do attitude, and you can drive the javascript debugger in your browser, it's just going to be time consuming, not difficult.
The place to start: the exception says "undefined is not a valid argument for instanceof". This means that somewhere in the chain evaluating "" > bytearray(b"hello world")
, a call is made to check obj instanceof type
- but type is not defined. Internally, Batavia shouldn't ever be getting an undefined - it uses None in a few places, but if you're getting undefined, it means that either the wrong type is being passed around, or a non-existent attribute has been requested.
So - the first debugging step - find out which call to instanceof
is raising the exception, and trace back until you find where the undefined value has come from. Once you've got that worked out, you need to make sure you don't get an undefined value. Although that last part probably sounds daunting, I'm willing to bet it will be fairly obvious - a really obvious case where a type is missing from a list, or something like that.
Fortunately for me, the problem was a simple one: I had misspelled a batavia type.
Hi, jstoebel, I'm working on bytes()
, was planning to do str.encode()
next and implement bytes/str equality, then do bytearray()
. I see from this issue that you are working on bytearray()
too, am I mistaken? My working branch is here: https://github.com/pybee/batavia/pull/221
Hi @candeira I'm not actively working on this at the moment, opting instead to work on the time
module. It sounds like you're motivated so go ahead. You won't be stepping on my toes.
Thanks for the check in though!
No worries, cheers!
Working on
String.__ge__
I encountered this error when running tests. Would it be appropriate to take a crack at this? Any words of wisdom/hints?