vendredi 4 septembre 2020

Is "try" in Python similar to "if..cerr" in C++?

Is Python's code exception:

try:
     instruction
except error:
       print("error1")

similar or equal to C++:

if(condition){
       cerr<<"error1";
    }

?

Aucun commentaire:

Enregistrer un commentaire