rewrite throw template