• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

[code] Error raising scriptlets for testing

Scheduled Pinned Locked Moved Developers' Forum
1 Posts 1 Posters 1.0k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    Dan Rathbun
    last edited by 9 Feb 2011, 02:25


    [ code ] Error raising scriptlets for testing purposes.


    Here's a collection of scriptlets that raise errors when you load them. They each only have one line of code:

    <span class="syntaxdefault">raise</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">Exception</span><span class="syntaxkeyword">,</span><span class="syntaxstring">"This is a test error raised by '#{__FILE__}'"</span><span class="syntaxkeyword">)</span><span class="syntaxdefault"> </span>
    

    Load these scripts from one of your scripts or plugins, in order to test
    what happens when exceptions are raised.

    Helps you refine your rescue clauses, to trap all errors correctly. (I made them to test loading scripts from Ruby Console Plugins.)


    I have them in a subfolder called Plugins/test/error so you'll see the zip folder is named "error", but you can put the error folder anywhere you wish (ex: a subfolder named "Plugins/dev".)

    Each file is named after the exact Ruby Exception class, Ex: "SyntaxError.rb"



    error.zip

    I'm not here much anymore.

    1 Reply Last reply Reply Quote 0
    • 1 / 1
    1 / 1
    • First post
      1/1
      Last post
    Buy SketchPlus
    Buy SUbD
    Buy WrapR
    Buy eBook
    Buy Modelur
    Buy Vertex Tools
    Buy SketchCuisine
    Buy FormFonts

    Advertisement