drag and drop on a Rubyscript: displaying raise errormessage
===

I have a script which i start by a drag and drop of a file from explorer onto a link on the windows desktop to my script, so the filename becomes the parameter of my script, this is handy for users who don't know how to start my script with a valid parameter. This works perfectly.

But when in the script i raise an error the errormessage is displayed but the console window closes without giving the user the time to read the message.
Putting a gets or a sleep at the end of the script or after the raise doesn't help.

How to fix that please ?

    if ARGV[0] 
      filename = ARGV[0]
    else
      raise "No filename given"
    end
    #some other code with wrong data
    error = true
    if error   
      raise "An error has occured, wrong data"
    end

