add template map for error and exception