Exception handling mit Apex (force.com)

Gibt es eine Möglichkeit, löst eine standard-oder benutzerdefinierte Ausnahme mit Apex-Methode als,

 private void createNewJob() throws RecordNotFoundException { 

  try {         
         //Some DML operation                
      } catch (Exception e) {  
         System.Debug('Error: Object not found');
         throw new RecordNotFoundException('Object not found');
      }
  }
InformationsquelleAutor Channa | 2012-01-02
Schreibe einen Kommentar