API: How do I capture cling's error/warning messages?

Hi all,

I am embedding cling in one of my applications, and I wanted know if there is a straightfoward mechanism of capturing the error and warning messages that are produced by cling when bad input is received.

Can anyone help me with this?


Sure, just tell cling’s CompilerInstance to use your custom DiagnosticsEngine. That will then receive all diagnostics and you can do with them whatever you please :slight_smile:

Cheers, Axel.