PrimeFaces with JSF - "onerror " in the <p:commandButton> doesn't work
===

I am using JSF,with ManagedBean annotation and using Primefaces, and i got the following problem.

I would like to know why the "onerror" is not triggered !  The exception just appears in my console.

**login.xhtml**  

    <p:commandButton value="teste" action="#{loginBean.methodTest()}" ajax="true" immediate="false" onerror="confirmation.show()" />

    <p:dialog  appendToBody="true" header="Atencao" widgetVar="confirmation"  showEffect="bounce">  
...  
</p:dialog>  

**MyBean**

    @ManagedBean(name = "loginBean") 
    @SessionScoped  public class LoginBean {
    
        public void methodTest() throws Exception {
    		 		System.out.println("hi");		
    		 		throw new Exception("Exception Test");		 	 }
    
   Thanks EveryBody !!   