error messages in register an expression