sketchucation logo sketchucation
    • Login
    šŸ¤‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    [code] Error raising scriptlets for testing

    Scheduled Pinned Locked Moved Developers' Forum
    1 Posts 1 Posters 1.0k Views 1 Watching
    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.
    • Dan RathbunD Offline
      Dan Rathbun
      last edited by


      [ 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
      • First post
        Last post
      Buy SketchPlus
      Buy SUbD
      Buy WrapR
      Buy eBook
      Buy Modelur
      Buy Vertex Tools
      Buy SketchCuisine
      Buy FormFonts

      Advertisement