I have an application that generates code which it writes to file. Then the main program includes and runs this file in amongst all the other bits and bobs.
My question is ...
Is there a way to ensure that the generated code is without errors before it is run?
As on the odd occasion an error has been written into the file it just breaks the whole system.
I have been racking my brains to work out a way to do this but i cant think of anything.
I am not really looking for code, just a theory or idea as to how this could be achieved.
Thank you for your ideas.