1. Welcome to the Starbound support forums. Please check the support FAQs before posting: http://playstarbound.com/support

Bug/Issue Using pcall() in LUA

Discussion in 'Starbound Support' started by Zoomah, Aug 9, 2016.

  1. Zoomah

    Zoomah Big Damn Hero

    Hello

    I'm on the update of my mods. I use root.assetJson() in some cases and even expect, that it throws exceptions in rare cases. To prevent the script from crashing and to keep the log clean i used pcall(). The problem is, that the whole stack trace still lands in the log.

    I know that it is probably caused by the LuaEngine you use. Would it be possible to turn off logging for code run by pcall() and for the case you really need that log bring in a new 'void sb.enablePcallLogging(boolean enable)' that enables logging for selected code chunks.

    It would be a great addition, since it keeps the log clean.
     

Share This Page