lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hallo,

Jan Schütze wrote:
Hey,

the difference is (in javascript):
try {
   // try something strange which usually works
} catch (e) {
   // on exception
}

there it actually does not matter where the exception is thrown, you just need to find a place where the try+catch handles it. So its' pretty much, like php5/c#/java/delphi manages exceptions and gives you quite simple possibility to handle the exceptions when it occurs and where you want to handle it - with the opportunity to continue the script after the exception is handled. I wasn't able to create a quite similar and simple approach in lua, yet. It would be cool, if that would be possible with error+pcall somehow!


I didn't think you were talking about syntactic differences. To write something like that you'd need MetaLua.

-alex
http://www.ventonegro.org/