handle literals and error