Not quite equivalent, but capture in Stata allows the program (or loop) to continue with errors. This is similar to try/catch in MATLAB (or Java). An example to check if a variable exists before calculating its mean, based on information at http://stackoverflow.com/questions/16884421/does-stata-have-any-try-and-catch-mechanism-similar-to-java :
sysuse autocapture su mpg, meanonlyif _rc == 0 { local mpg_mean = r(mean)}else display "var1 does not exist"capture su kpg, meanonlyif _rc == 0 { local kpl_mean = r(mean)}else display "kpl does not exist"