introduce getException template.