The FullAjaxExceptionHandler
should be able to handle it. Your concrete problem is probably caused because you've a relatively large page which overflowed Facelets' default buffer size of 2KB and thus the response is already committed at the point the exception is been thrown. When a response is committed, a part of the response has already been sent to the client side. There is no way to take the already sent bytes back and present a new response with the error page. You would have exactly the same problem when not using ajax. The exception will instead get logged and the client will stuck with a halfbaked page.
You may want to increase the default response buffer size to about the size of your largest HTML response. This way the response will be generated and buffered fully in server's memory before the first byte get sent to the client side. You can set it by the javax.faces.FACELETS_BUFFER_SIZE
context param in web.xml
with the buffer size in bytes as value. The following example sets it to 64KB.
<context-param>
<param-name>javax.faces.FACELETS_BUFFER_SIZE</param-name>
<param-value>65535</param-value>
</context-param>
You may want to set this in development/testing environment only so that any mistakes in the view side can be spotted and the live environment can keep using the default buffer size to save server memory.