fixed opts.what exception