Some questions about exceptions #4035
Replies: 1 comment
-
Posted at 2014-08-19 by Uhv And one more question. Posted at 2014-08-19 by Uhv This is wrong message. I don't know how to delete it... Posted at 2014-08-21 by @gfwilliams Hi, The built-in Error class is really just a way to handle SyntaxError,ReferenceError,etc without using up too much extra memory. I'm afraid you can't catch out of memory errors... Almost by definition there's no memory left even to allocate an Error class to throw! If you are continuously appending to strings the best bet is to consult Thanks for letting me know about Exceptions - they've been added to Espruino relatively recently and it looks like there are still some glitches to iron out. I've filed a bug for this and I'll try and fix it for the next release. Posted at 2014-08-22 by Uhv Good. I've understood. I'll wait the new release. Actually exceptions are good tool to make a reliable programm. Is any quick way to get to know how many words (bytes) requires the object/variable? By the way the 1v69 release works properly on HY-STM32_24VE Posted at 2014-08-22 by DrAzzy If there isn't a function to tell us how many memory units a variable (obviously, object/arrays/functions are the interesting ones) is using, there should be. Posted at 2014-08-22 by @gfwilliams I don't think there is right now, but I was planning on adding it. I've just put an 'issue' in for it. Posted at 2014-08-25 by @gfwilliams Fixed now (including adding an Posted at 2014-08-25 by Uhv Great. I'm waiting... :-) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2014-08-19 by Uhv
Hi, Gordon.
I'd like to ask a bit of questions about exeptions:
is it possible to see a list with kinds of errors anywhere?
i've tried to catch some errors and all of them were simply 'Error' :-)
standart "try..catch" block can't intercept it. It's not a great to get
a broken program by this fault.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions