在插入数据的时候进行异常处理
Account a = new Account(Name=’Acme’);
try {
insert a;
} catch(DmlException e) {
// Process exception here
}
在插入数据的时候进行异常处理
Account a = new Account(Name=’Acme’);
try {
insert a;
} catch(DmlException e) {
// Process exception here
}