Use PROMPT_COMMAND to switch emo with error code