Article 5ANG1 what is java catch exception code for I/O and exec functions?

what is java catch exception code for I/O and exec functions?

by
mfoley
from LinuxQuestions.org on (#5ANG1)
I have:
Code: try {
fs = new FileOutputStream(cmdFile);
ps = new PrintStream(fs);
}
catch (Exception e) { return e.getErrorCode(); }

// and
Process p = null;

try {
p = Runtime.getRuntime().exec("chmod +rx " + cmdFile);
p.waitFor();
} catch ( Exception e) { return e.getErrorCode(); }but I get:
Code:An error occurred at line: [19] in the jsp file:
getErrorCode cannot be resolved or is not a fieldThis is part of a function and I want to return the error status code of the failure. How can I do that?latest?d=yIl2AUoC8zA latest?i=nHRGR-AM5cs:nS-MI9gwzo0:F7zBnMy latest?i=nHRGR-AM5cs:nS-MI9gwzo0:V_sGLiP latest?d=qj6IDK7rITs latest?i=nHRGR-AM5cs:nS-MI9gwzo0:gIN9vFwnHRGR-AM5cs
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments