You need to sign in to do that
Don't have an account?
111
how can i get the number of failed rows for Exception?
there is getNumDml()-method for DML exceptions?
anyone know the method to get the Apex-code-Exception' rows?
i want to returns the number of failed rows for the Excetion Not DML exceptions.
try {
OpportunityLineItem newAcct = new OpportunityLineItem(Description ='testdddd');
insert newAcct;
insert newAcct;
}catch (Exception e) {
List<String> listStack = new List<String>();
// method is not getNumDml(Returns the number of failed rows for DML exceptions)
listStack.add(String.valueOf( method );
listStack.add(e.getTypeName());
}
thank you for your help
but i don't want to get the System.DMLException'error - row, i want to get the Exception'error - row
i want to get the Exception'error - row-method like the method(e.getNumDml()),but not e.getNumDml()
e.getNumDml() : Returns the number of failed rows for DML exceptions.
try {
BMessageBean bbbMessageBean = null;
bbbMessageBean.resMessage = 'd';
}catch (Exception e) {
bMessageBean.listStack.add(String.valueOf(e.getNumDml()));
}
i got the error:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
faultSubcode:
faultString: System.TypeException: Procedure is only valid for System.DmlException and System.MailException
e.printStackTrace();
}