ruby custom raise callback