Problem with logging of the last error

Hi, we are using the $config->maxErrorCount on eXpansion and noticed that when the system stopped due to that we had a missing error message. 
SO just called displayAndLogError before increaseErrorCount to fix it. 

also added a message to see why it has ended

I suppose this might cause a nice loop as well if the error comes from the displayAndLogError but after a short while a nice stack overflow should still stop the system XD