Package org.pentaho.platform.api.repository

Examples of org.pentaho.platform.api.repository.ContentException


    Exception ex4 = new RepositoryException( "Ignored", ex3 ); //$NON-NLS-1$
    Exception ex5 = new AuditException();
    Exception ex6 = new AuditException( "Ignored" ); //$NON-NLS-1$
    Exception ex7 = new AuditException( "Ignored", ex ); //$NON-NLS-1$
    Exception ex8 = new AuditException( ex4 );
    ex = new ContentException( "Ignored" ); //$NON-NLS-1$
    ex = new ContentException( "Ignored", ex5 ); //$NON-NLS-1$
    ex = new ContentException( ex6 );
    ex = new InvalidParameterException();
    ex = new SQLResultSetException();
    ex = new PentahoChainedException();
    ex = new PentahoChainedException( "Ignored" ); //$NON-NLS-1$
    ex = new PentahoChainedException( "Ignored", ex7 ); //$NON-NLS-1$
View Full Code Here


    }
    try {
      HibernateUtil.getSession().saveOrUpdate( obj );
    } catch ( HibernateException ex ) {
      HibernateUtil.log.error( Messages.getInstance().getErrorString( "HIBUTIL.ERROR_0010_SAVING_UPDATING" ), ex ); //$NON-NLS-1$
      throw new ContentException( Messages.getInstance().getErrorString( "HIBUTIL.ERROR_0010_SAVING_UPDATING" ), ex ); //$NON-NLS-1$
    }
  }
View Full Code Here

    }
    try {
      HibernateUtil.getSession().delete( obj );
    } catch ( HibernateException ex ) {
      HibernateUtil.log.error( Messages.getInstance().getErrorString( "HIBUTIL.ERROR_0011_DELETING_OBJ" ), ex ); //$NON-NLS-1$
      throw new ContentException( Messages.getInstance().getErrorString( "HIBUTIL.ERROR_0011_DELETING_OBJ" ), ex ); //$NON-NLS-1$
    }
  }
View Full Code Here

public class ContentExceptionTest extends TestCase {
  private Logger logger = LogManager.getLogger( ContentExceptionTest.class );

  public void testContentException2() {
    logger.info( "Expected: Exception will be caught and thrown as a Content Exception" );
    ContentException ce1 = new ContentException( "A test Content Exception has been thrown" );
    System.out.println( "ContentException :" + ce1 );
    assertTrue( true );
  }
View Full Code Here

    assertTrue( true );
  }

  public void testContentException3() {
    logger.info( "Expected: A Content Exception will be created with Throwable as a parameter" );
    ContentException ce2 = new ContentException( new Throwable( "This is a throwable exception" ) );
    System.out.println( "ContentException" + ce2 );
    assertTrue( true );
  }
View Full Code Here

    assertTrue( true );
  }

  public void testContentException4() {
    logger.info( "Expected: Exception will be caught and thrown as a Content Exception" );
    ContentException ce3 = new ContentException( "A test UI Exception has been thrown", new Throwable() );
    System.out.println( "ContentException :" + ce3 );
    assertTrue( true );
  }
View Full Code Here

            throw new FileNotFoundException();
          }
          return new RepositoryFileInputStream( repositoryFile );
        }
      } catch ( FileNotFoundException e ) {
        throw new ContentException( e );
      } catch ( IOException e ) {
        throw new ContentException( e );
      }
    }
    return inputStream;
  }
View Full Code Here

TOP

Related Classes of org.pentaho.platform.api.repository.ContentException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.