How to detect any kind of errors, print those errors and quit the program.

1 vue (au cours des 30 derniers jours)
Kondal A
Kondal A le 21 Mai 2020
Commenté : Cris LaPierre le 21 Mai 2020
Hi there,
I have some .prj files which I need to load from the windows command window. Once the .prj file load is successful, I will use the "build" command to build the code. While loading or building, if there are any errors found, it should catch the errors and print the custom error message and quit the program. Currently, I am able to load the .prj file and enter the "build" command to build my code but I am not able to figure out how to catch if there are any errors. Can anyone please help me?
Thanks in advance!

Réponses (1)

Cris LaPierre
Cris LaPierre le 21 Mai 2020
Perhaps a try-catch?
  2 commentaires
Kondal A
Kondal A le 21 Mai 2020
Can you please give me an example?
Cris LaPierre
Cris LaPierre le 21 Mai 2020
There are several in the documentation page I linked to above. Here's a direct link.

Connectez-vous pour commenter.

Catégories

En savoir plus sur MATLAB Compiler dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by