Checking gdscript code parseability at runtime without throwing errors

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Jan Heemstra
:warning: Old Version Published before Godot 3 was released.

In this question:
it is explained how to execute a string containing source code. However, this solution will give an error when the source code can’t be parsed. Is it possible to intercept this parsing process somehow, and use the (in)parseability information to for instance notify the user about the problem, without filling the log with errors?