Ignore:
Timestamp:
05/11/12 10:38:02 (12 years ago)
Author:
niltonneto
Message:

Ticket #2507 - Refatorado e centralizado tratamento de Erros.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/webservice/api/adapters/ExpressoAdapter.php

    r6149 r6165  
    100100                if($this->getResult()) 
    101101                        $body['result'] = $this->getResult(); 
    102                 else 
    103                         throw new ResponseException("",Errors::E_UNKNOWN_ERROR); 
     102                else { 
     103                        Errors::runException("E_UNKNOWN_ERROR");                         
     104                } 
     105                 
    104106                 
    105107                $response->body = json_encode($body); 
     
    115117                        } 
    116118                        else{ 
    117                                 throw new ResponseException("",Errors::LOGIN_AUTH_INVALID); 
     119                                Errors::runException("LOGIN_AUTH_INVALID");                                                      
    118120                        } 
    119121                } 
    120122                else{ 
    121                         throw new ResponseException("",Errors::LOGIN_NOT_LOGGED_IN); 
     123                        Errors::runException("LOGIN_NOT_LOGGED_IN");                     
    122124                }                
    123125        }        
Note: See TracChangeset for help on using the changeset viewer.