Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
🫛 Lightbeans Update | Metallic and Roughness auto-applied in SketchUp 2025+ Download
Throw exception when required file does not exist?
-
I wanted to do this:
begin require 'file' rescue # endBut it does work? Why not?
I know I can do it other ways, but I'm just curious if there's a reason for the behavior.
-
rescue with no argument will default to
StandardError.
What you want is:begin require 'foods' rescue LoadError puts "not there" end -
Ah! Thank you Adam.
But I think I may just be being too lazy to check if the files exists...
Advertisement