void umount3() { // START SNIPPET: umount3 try { TVFS.umount(); // with or without parameters } catch (FsSyncWarningException oops) { // Only objects of the class FsSyncWarningException exist in // the exception chain - we ignore this. } catch (FsSyncException ouch) { // At least one exception occured which is not just an // FsSyncWarningException. // This indicates loss of data and needs to be handled. // Print the sequential I/O exception chain in order of // descending priority and ascending appearance. ouch.printStackTrace(); //ouch.sortPriority().printStackTrace(); // equivalent } // END SNIPPET: umount3 }
void umount2() { // START SNIPPET: umount2 try { TVFS.umount(); // with or without parameters } catch (FsSyncException ouch) { // Print the sequential I/O exception chain strictly in order of // ascending appearance instead. ouch.sortAppearance().printStackTrace(); } // END SNIPPET: umount2 }
void umount1() { // START SNIPPET: umount1 try { TVFS.umount(); // with or without parameters } catch (FsSyncException ouch) { // Print the sequential I/O exception chain in order of descending // priority and ascending appearance. // This is the default so you wouldn't have to call sortPriority(). ouch.sortPriority().printStackTrace(); //ouch.printStackTrace(); // equivalent } // END SNIPPET: umount1 }
if (!(ex.getCause() instanceof FsResourceOpenException)) throw ex;
void umount3() { // START SNIPPET: umount3 try { TVFS.umount(); // with or without parameters } catch (FsSyncWarningException oops) { // Only objects of the class FsSyncWarningException exist in // the exception chain - we ignore this. } catch (FsSyncException ouch) { // At least one exception occured which is not just an // FsSyncWarningException. // This indicates loss of data and needs to be handled. // Print the sequential I/O exception chain in order of // descending priority and ascending appearance. ouch.printStackTrace(); //ouch.sortPriority().printStackTrace(); // equivalent } // END SNIPPET: umount3 } }