compiler: catch and extend top-level exceptions

fix #29
0.7.13