When does a program show a compiling error?

When a program contains a compiler error, the compiler will detect it, preventing the program from compiling. Compiler errors must be fixed before a program will compile successfully.