HPCC-10503 Compile errors not caught cleanly

Add code fragment to catch compile errors and report it.

Signed-off-by: Attila Vamos <attila.vamos@gmail.com>