Resource exceptions contain a status object describing the cause of the exception, and optionally the path of the resource where the failure occurred.
640641642643644645646647648649
} catch ( XAException xaerr ) { errors.push ( xaerr ); String msg = interpretErrorCode ( resourcename_ , "end" , xid_ , xaerr.errorCode ); Configuration.logDebug ( msg, xaerr ); throw new ResourceException ( msg, errors ); } state_ = TxState.LOCALLY_DONE; } }
191192193194195196197198199200201
@Override public void onBrowserEvent(Event event) { if(event.getTypeInt()==Event.ONLOAD){ assetOnLoad(toReturn); }else if(event.getTypeInt()==Event.ONERROR){ assetOnError(toReturn,new ResourceException(imgRes,"Error:can not fetch the file.")); }else{ return; } } });
6869707172737475767778798081
{ return ImageIO.read(url); } catch (final IOException e) { throw new ResourceException("Unable to load image " + filename + ": " + e, e); } } else { throw new ResourceException("Couldn't find image " + filename); } }
290291292293294295296297298299300301302303304305
{ tryScriptName = "/WEB-INF/groovy/" + name; url = _servletContext.getResource(tryScriptName); } if (url == null) throw new ResourceException("Resource \"" + name + "\" not found!"); else url = new URL("file", "", _servletContext.getRealPath(tryScriptName)); return url.openConnection(); } catch (IOException e) { throw new ResourceException("Problems getting resource named \"" + name + "\"!", e); } }
6364656667686970
public void begin() throws ResourceException { try { transaction.begin(); } catch (ResourceException e) { throw new ResourceException(e.getMessage()); } }
7172737475767778
public void commit() throws ResourceException { try { transaction.commit(); } catch (ResourceException e) { throw new ResourceException(e.getMessage()); } }
7980818283848586
public void rollback() throws ResourceException { try { transaction.rollback(); } catch (ResourceException e) { throw new ResourceException(e.getMessage()); } }
6263646566676869
7071727374757677
7879808182838485