Skip to main content
YingJunlang Ma perguntou em #Apex
What I'm trying to do here is whenever an exception is caught, I would like to send a chatter message to a specific group.

However, it looks like the "throw new AuraHandledException" stops the chatter from getting posted.  If I comment out this line where it throws the AuraHandledException, I'am able to see the chatter getting posted.  But I'm not able to send the chatter and throw the exception.

Any idea what could be the cause?  Is there a work around for this?

Thanks

 

try{

something..

}

catch(Exception ex){ Utils.sendChatter('chatter message');

throw new AuraHandledException('Something went wrong: '+ ex.getMessage());

}

 
1 resposta
0/9000