From: Ben Bleything Date: 2010-02-14T02:46:59+09:00 Subject: Re: What is the best exception to use for bad Data State? On Sat, Feb 13, 2010 at 9:10 AM, Xeno Campanoli wrote: > For now I am using "ScriptError".  I was using "SyntaxError", but I think > that was just wrong.  Here are some places: > > I have what I want to be pure virtual methods in a base class: > > def myPureVirtualMethod >        raise ScriptError, "This should never be called.  Daughter Classes > MUST         define their own." > end I use NotImplementedError for base methods in a "virtual" class. > def validateThatThingMadeByPureVirtualMethodIsThere >        unless theThingMMadeByPureVirtualMethodIsThere? >                raise ScriptError, "That thingy isn't there." >        end > end Absolutely NotImplementedError here too. Ben