You get that for free just by blindly subclassing Exception, which is what I recommend.