Make error extension be able to support more arguments