Hello,
I am quite new on D365FO, I am still learning all the ChainOfCommand process.
I extended a standard class which i have to modify the main() method.
//main method in the standard class
public static void main(Args _args)
{
//Some code
if(....)
{
throw error("Error message");
}
}
So, i extend the main method in the extended class. My problem is that after "next main(null)" there is the possibility that the previous error message is thrown, which i want want to ignore because i am implementing the logic on the extended method
So, i got the idea of doing some try/catch on the extended method.
//Extended method
public static void main(Args _args)
{
//some code
try
{
next main(null)
}
catch (Exception::Error)
{
continue;
}
//custom code
Buut, this is not totally correct because i only want to ignore the error thrown in the main method, not other system errors.
Is there any way to achieve my goal?
Thanks in advance,
Eisenberk