Tag: cws_src680_oj14 User: fs Date: 2007-06-06 19:46:25+0000 Log: execute: throw a WrappedTargetException telling wrapping the other exception we caught, this gives the caller more information about what happened
File Changes: Directory: /dba/reportdesign/java/com/sun/star/report/pentaho/ ============================================================== File [changed]: SOReportJobFactory.java Url: http://dba.openoffice.org/source/browse/dba/reportdesign/java/com/sun/star/report/pentaho/SOReportJobFactory.java?r1=1.1.2.3&r2=1.1.2.4 Delta lines: +8 -13 -------------------- --- SOReportJobFactory.java 2007-06-06 07:03:51+0000 1.1.2.3 +++ SOReportJobFactory.java 2007-06-06 19:46:22+0000 1.1.2.4 @@ -4,9 +4,9 @@ * * $RCSfile: SOReportJobFactory.java,v $ * - * $Revision: 1.1.2.3 $ + * $Revision: 1.1.2.4 $ * - * last change: $Author: oj $ $Date: 2007/06/06 07:03:51 $ + * last change: $Author: fs $ $Date: 2007/06/06 19:46:22 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -87,7 +87,7 @@ try { m_xMCF = m_cmpCtx.getServiceManager(); } catch( Exception e ) { - e.printStackTrace(); + e.printStackTrace(System.err); } m_prophlp = new PropertySetMixin(m_cmpCtx, this, new Type(XJob.class), @@ -190,16 +190,11 @@ final ReportJob job = engine.createJob(definition); job.execute(); - }catch (JobDefinitionException e){ - throw new com.sun.star.lang.IllegalArgumentException(); - }catch (java.io.IOException e){ - throw new com.sun.star.lang.IllegalArgumentException(); } catch(java.lang.Exception e) { - System.out.println(e); - throw new com.sun.star.lang.IllegalArgumentException(); + throw new com.sun.star.lang.WrappedTargetException( "caught a " + e.getClass().getName(), this, new com.sun.star.uno.Exception( e.getLocalizedMessage() ) ); } catch (java.lang.IncompatibleClassChangeError e2){ - e2.printStackTrace(); - System.out.println(e2); + e2.printStackTrace(System.err); + System.err.println(e2); } Thread.currentThread().setContextClassLoader(cl); @@ -253,8 +248,8 @@ xFactory = Factory.createComponentFactory(_SOReportJobFactory.class, _SOReportJobFactory.getServiceNames()); } catch (java.lang.IncompatibleClassChangeError e2){ - e2.printStackTrace(); - System.out.println(e2); + e2.printStackTrace(System.err); + System.err.println(e2); } return xFactory; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
