Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Feature Request: Allow overriding error handler

edited April 2013 in Suggestions Posts: 580

@Simeon Would it be possible for Codea to allow us to provide our own error handler for whenever Lua encounters an exception? I think it would be nice to be able to provide customized information about the error received (for example, a full stack trace to where the error occurred), and a change I want to make to my module system would also greatly benefit from this. Thoughts?

Comments

  • Posts: 580

    Actually, as far as my module system is concerned, I've found a solution :)

    So, nevermind, unless there are others who would like this feature as well.

  • Posts: 580

    Actually I take that back...my solution only partially works :( Anyway, if you get some time, and don't think it's a crappy idea, it would be really helpful to me. Thanks!

  • Jmv38Jmv38 Mod
    Posts: 3,295

    Isnt there some lua function to manage erros? pcall()?

  • Posts: 580

    Yeah, but that won't help me here, because I can't call pcall() on the code that Codea calls (which is, well, all of it...). What I'd really like is for whenever Codea encounters an exception, it checks to see if you've installed a custom handler, and if so, calls it with the debug information from the exception. If not, it will just call the default error handler that it's calling now. Does that make sense?

Sign In or Register to comment.