Compile time error safety

Is there any way to ensure no error before running a program? I want to prevent unhandled error in compile time.
Was this page helpful?