From: Yaser Sulaiman Date: 2010-07-21T00:33:27+09:00 Subject: Re: Adding to the Errno module --0015175cd9fccd9ca2048bd367d4 Content-Type: text/plain; charset=ISO-8859-1 Hi Matt. I think you need to define Errno::EFTYPE::Errno and assign it an integer. module Errno class EFTYPE < SystemCallError Errno = 42 end end Now in IRB, you'll get something like the following: irb(main):014:0> raise Errno::EFTYPE, "trying to raise an error here" Errno::EILSEQ: Illegal byte sequence - trying to raise an error here from (irb):14 Notice that 42 is the "integer operating system error number corresponding to" [1] Errno::EILSEQ. You may want to select a different (the appropriate?) value. HTH, Yaser [1]: http://ruby-doc.org/docs/ProgrammingRuby/html/ref_m_errno.html --0015175cd9fccd9ca2048bd367d4--