
I wrote a tool which processes the source code which is about to be compiled, and checks whether a procedure contract has been respected or not. So far so good, the If there are one or more contracts not respected, the source should not compile the source at all, since something is not ok. The problem is I don't know a good way to stop that.
Right now I'm simply deleting the temp file which the compiler is expecting to compile, thus generating a compiler error (line not found), but effectively preventing the compilation. I was also thinking about inserting a new line in the code with some wrong statement.
Is there a command to tell the compiler to halt the compilation process? Or anyone has a better idea?
Thanks!