Print an error message in case of a no memory.