Error messages are saved in the buffer *Messages*. To open it, there is a command: C-h e. You can also simply click on the echo area at the bottom of the window.
By default, the last 1000 lines of messages are saved. You can change this by setting a variable message-log-max.
source
share