Answers for "try except lua"

Lua
2

try except lua

require "try-catch"

try {
   function()
      error('oops')
   end,

   catch {
      function(error)
         print('caught error: ' .. error)
      end
   }
}
Posted by: Guest on June-23-2020

Browse Popular Code Answers by Language