Catch result of SendMessage (RequireReceiver)

myComponent.SendMessage("testMethod", SendMessageOptions.RequireReceiver);

The code above will display an message, if no receiver is found, but is there any way to catch this by script?

There doesn't appear to be a way to do this neatly.

You could use Application.RegisterLogCallback, which - I think - would allow you to detect the error, but the error would still be printed to the console rather than hidden.

It also seems that RegisterLogCallback has a bit of a usage bug.

Another method to get around this would be to use one of the ready-made messaging systems available on the Unity Wiki, or and modify it yourself to provide some kind of feedback if there are no registered receivers for your given message.

I'd be tempted to go with the latter, if your project design specifically needs this feature as a functional requirement, rather than just for debugging purposes.

I found a workaround by the Component to a MonoBehaviour and then calling the method with try{} catch{}:

 try {
 catch {

This is not done at runtime, only inside the editor... :)