Define some error codes
change method NewDialect to New