wro4j-core/src/main/java/ro/isdc/wro/model/factory/FallbackAwareWroModelFactory.java
@Override
  public WroModel create() {
    WroModel newModel = null;
    try {
      newModel = super.create();
    } catch (final WroRuntimeException e) {
      LOG.error("Error while creating the model", e);
    }
    if (newModel == null) {
      LOG.warn("Couldn't load new model, reusing last Valid Model!");
      if (lastValidModel == null) {
        throw new WroRuntimeException("No valid model was found!");
      }
      return lastValidModel;
    }
    lastValidModel = newModel;
    return lastValidModel;
  }
@Override
  public WroModel create() {
    WroModel newModel = null;
    try {
      newModel = super.create();
    } catch (final WroRuntimeException e) {
      LOG.error("Error while creating the model", e);
    }
    if (newModel == null) {
      LOG.warn("Couldn't load new model, reusing last Valid Model!");
      if (lastValidModel == null) {
        throw new WroRuntimeException("No valid model was found!");
      }
      return lastValidModel;
    }
    lastValidModel = newModel;
    return lastValidModel;
  }
@ Override public WroModel create ( ) { WroModel newModel = null ; try { newModel = super . create ( ) ; } catch ( final WroRuntimeException e ) { LOG . error ( "Error while creating the model" , e ) ; } if ( newModel == null ) { LOG . warn ( "Couldn't load new model, reusing last Valid Model!" ) ; if ( lastValidModel == null ) { throw new WroRuntimeException ( "No valid model was found!" ) ; } return lastValidModel ; } lastValidModel = newModel ; return lastValidModel ; }
{@inheritDoc}
{