problems.add( SettingsProblem.Severity.ERROR, "Failed to interpolate settings: " + e.getMessage(), -1, -1, e );
throw new ModelInterpolationException( e.getMessage(), e );
throw new ModelInterpolationException( e.getMessage(), e );
.setMessage( e.getMessage() ).setException( e ) );
public String interp( String value ) throws ManipulationException { try { return interp.interpolate( value, ri ); } catch ( final InterpolationException e ) { throw new ManipulationException( "Failed to interpolate: %s. Reason: %s", e, value, e.getMessage() ); } } }
public static BootOptions loadFromSysprops() throws AproxBootException { final String bootDef = System.getProperty( BootInterface.BOOT_DEFAULTS_PROP ); File bootDefaults = null; if ( bootDef != null ) { bootDefaults = new File( bootDef ); } try { final String aproxHome = System.getProperty( BootInterface.APROX_HOME_PROP, new File( "." ).getCanonicalPath() ); return new BootOptions( bootDefaults, aproxHome); } catch ( final IOException e ) { throw new AproxBootException( "ERROR LOADING BOOT DEFAULTS: %s.\nReason: %s\n\n", e, bootDefaults, e.getMessage() ); } catch ( final InterpolationException e ) { throw new AproxBootException( "ERROR RESOLVING BOOT DEFAULTS: %s.\nReason: %s\n\n", e, bootDefaults, e.getMessage() ); } }
public static BootOptions loadFromSysprops() throws IndyBootException { final String bootDef = System.getProperty( BootInterface.BOOT_DEFAULTS_PROP ); File bootDefaults = null; if ( bootDef != null ) { bootDefaults = new File( bootDef ); } try { final String indyHome = System.getProperty( BootInterface.INDY_HOME_PROP, new File( "." ).getCanonicalPath() ); return new BootOptions( bootDefaults, indyHome); } catch ( final IOException e ) { throw new IndyBootException( "ERROR LOADING BOOT DEFAULTS: %s.\nReason: %s\n\n", e, bootDefaults, e.getMessage() ); } catch ( final InterpolationException e ) { throw new IndyBootException( "ERROR RESOLVING BOOT DEFAULTS: %s.\nReason: %s\n\n", e, bootDefaults, e.getMessage() ); } }
public String interpolate( final String string ) throws AppContextInterpolationException { try { return InternalFactory.getInterpolator( this ).interpolate( string ); } catch ( InterpolationException e ) { throw new AppContextInterpolationException( e.getMessage(), e ); } }
public String interpolate(final String string) throws AppContextInterpolationException { try { return InternalFactory.getInterpolator(this).interpolate(string); } catch (InterpolationException e) { throw new AppContextInterpolationException(e.getMessage(), e); } }
private String getConfigString( String key, String currentValue, String defaultValue ) { String valueFromSysProps = System.getProperty( "redback." + key ); if ( StringUtils.isNotEmpty( valueFromSysProps ) ) { return valueFromSysProps; } String value = null; if ( StringUtils.isNotEmpty( currentValue ) ) { value = userConfiguration.getString( key, currentValue ); } else { value = userConfiguration.getString( key, defaultValue ); } // do some interpolation as we can have some ${plexus.home} etc... StringSearchInterpolator interpolator = new StringSearchInterpolator(); interpolator.addValueSource( new PropertiesBasedValueSource( System.getProperties() ) ); try { return interpolator.interpolate( value ); } catch ( InterpolationException e ) { // ignore interpolation issue log.warn( "skip issue during interpolation {}", e.getMessage() ); return value; } }
+ artifact + ". Reason: " + e.getMessage(), e );
throw new RuntimeException( e.getMessage(), e );
public synchronized String getKeycloakUiJson() throws AproxWorkflowException { if ( keycloakUiJson == null ) { final String raw = loadFileContent( config.getKeycloakUiJson() ); try { keycloakUiJson = getInterpolator().interpolate( raw ); } catch ( final InterpolationException e ) { throw new AproxWorkflowException( "Failed to resolve expressions in keycloak-ui.json: %s", e, e.getMessage() ); } } return keycloakUiJson; }
public synchronized String getKeycloakUiJson() throws IndyWorkflowException { if ( !config.isEnabled() ) { return null; } if ( keycloakUiJson == null ) { final String raw = loadFileContent( config.getKeycloakUiJson() ); try { keycloakUiJson = getInterpolator().interpolate( raw ); } catch ( final InterpolationException e ) { throw new IndyWorkflowException( "Failed to resolve expressions in keycloak-ui.json: %s", e, e.getMessage() ); } } return keycloakUiJson; }
public synchronized String getKeycloakInit() throws IndyWorkflowException { if ( keycloakInitJs == null ) { if ( !config.isEnabled() ) { keycloakInitJs = loadClasspathContent( DISABLED_KEYCLOAK_INIT_JS ); } else { final String raw = loadClasspathContent( KEYCLOAK_INIT_JS ); try { keycloakInitJs = getInterpolator().interpolate( raw ); } catch ( final InterpolationException e ) { throw new IndyWorkflowException( "Failed to resolve expressions in keycloak-ui.json: %s", e, e.getMessage() ); } } } return keycloakInitJs; }
public synchronized String getKeycloakInit() throws AproxWorkflowException { if ( keycloakInitJs == null ) { if ( !config.isEnabled() ) { keycloakInitJs = loadClasspathContent( DISABLED_KEYCLOAK_INIT_JS ); } else { final String raw = loadClasspathContent( KEYCLOAK_INIT_JS ); try { keycloakInitJs = getInterpolator().interpolate( raw ); } catch ( final InterpolationException e ) { throw new AproxWorkflowException( "Failed to resolve expressions in keycloak-ui.json: %s", e, e.getMessage() ); } } } return keycloakInitJs; }
throw new SiteToolException( "Cannot interpolate site descriptor: " + e.getMessage(), e );
} catch (InterpolationException e) { problems.add(new ModelProblemCollectorRequest(Severity.ERROR, Version.BASE) .setMessage(e.getMessage()).setException(e));