Examples of failure()


Examples of net.jcores.jre.utils.internal.Options.failure()

                    // Check if we should terminate
                    if (killswitch != null && killswitch.terminated()) return;

                    f0.f();
                } catch (Exception e) {
                    options$.failure(f0, e, "onetime:run", "Exception while executing f().");
                }
            }
        });

        // Register the future
View Full Code Here

Examples of net.jcores.jre.utils.internal.Options.failure()

                try {
                    final URL url = x.toURL();
                    final InputStream openStream = url.openStream();
                    return openStream;
                } catch (MalformedURLException e) {
                    options$.failure(x, e, "input:urimalformed", "Malformed URI.");
                } catch (IOException e) {
                    options$.failure(x, e, "input:ioerror", "Error opening the URI.");
                }

                return null;
View Full Code Here

Examples of net.jcores.jre.utils.internal.Options.failure()

                    final InputStream openStream = url.openStream();
                    return openStream;
                } catch (MalformedURLException e) {
                    options$.failure(x, e, "input:urimalformed", "Malformed URI.");
                } catch (IOException e) {
                    options$.failure(x, e, "input:ioerror", "Error opening the URI.");
                }

                return null;
            }
        }).array(InputStream.class));
View Full Code Here

Examples of org.elasticsearch.index.snapshots.IndexShardSnapshotStatus.failure()

                    ShardId shardId = new ShardId(index, i);
                    SnapshotShardFailure shardFailure = findShardFailure(snapshot.shardFailures(), shardId);
                    if (shardFailure != null) {
                        IndexShardSnapshotStatus shardSnapshotStatus = new IndexShardSnapshotStatus();
                        shardSnapshotStatus.updateStage(IndexShardSnapshotStatus.Stage.FAILURE);
                        shardSnapshotStatus.failure(shardFailure.reason());
                        shardStatusBuilder.put(shardId, shardSnapshotStatus);
                    } else {
                        IndexShardSnapshotStatus shardSnapshotStatus = indexShardRepository.snapshotStatus(snapshotId, shardId);
                        shardStatusBuilder.put(shardId, shardSnapshotStatus);
                    }
View Full Code Here

Examples of org.glassfish.api.ActionReport.failure()

            String msg = localStrings.getLocalString(GenericDeleteCommand.class,
                    "TypeAndNameResolver.target_object_not_found",
                    "Cannot find a {0} with a name {1}", targetType.getSimpleName(), name);
            logger.log(Level.SEVERE, ConfigApiLoggerInfo.TARGET_OBJ_NOT_FOUND,
                    new Object[] {resolver.getClass().toString(), parentType, targetType});
            result.failure(logger, msg);
            return;
        }
       
        try {
            ConfigBeanProxy parentProxy = child.parent().createProxy();
View Full Code Here

Examples of org.glassfish.api.ActionReport.failure()

                    if (decorator==null) {
                        String msg = localStrings.getLocalString(GenericCrudCommand.class,
                                "GenericCreateCommand.deletion_decorator_not_found",
                                "The DeletionDecorator {0} could not be found in the habitat,is it annotated with @Service ?",
                                delete.decorator().toString());
                        result.failure(logger, msg);
                        throw new TransactionFailure(msg);
                    } else {
                        // inject the decorator with any parameters from the initial CLI invocation
                        manager.inject(decorator, paramResolver);
View Full Code Here

Examples of org.glassfish.api.ActionReport.failure()

        } catch(TransactionFailure e) {
            String msg = localStrings.getLocalString(GenericCrudCommand.class,
                    "GenericDeleteCommand.transaction_exception",
                    "Exception while deleting the configuration {0} :{1}",
                    child.getImplementation(), e.getMessage());
            result.failure(logger, msg);
        }

    }
   
    @Override
View Full Code Here

Examples of org.glassfish.api.ActionReport.failure()

        if (parentBean==null) {
            String msg = localStrings.getLocalString(GenericCrudCommand.class,
                    "GenericCreateCommand.target_object_not_found",
                    "The CrudResolver {0} could not find the configuration object of type {1} where instances of {2} should be added",
                    resolver.getClass().toString(), parentType, targetType);
            report.failure(logger, msg);
            return;
        }
        // Force longOpt if output option is specified
        if (outputOpts != null) {
            longOpt = true;
View Full Code Here

Examples of org.glassfish.api.ActionReport.failure()

                String collist = arrayToString(getColumnHeadings(cols));
                String msg = localStrings.getLocalString(GenericCrudCommand.class,
                    "GenericListCommand.invalidOutputOpts",
                    "Invalid output option. Choose from the following columns: {0}",
                    collist);
                report.failure(logger, msg);
                return;
            }
            cols = filterColumns(cols, outputOpts);
            // sort the columns based on column ordering
            Collections.sort(cols, new Comparator<ColumnInfo>() {
View Full Code Here

Examples of org.glassfish.api.ActionReport.failure()

                    if (key==null) {
                        String msg = localStrings.getLocalString(GenericCrudCommand.class,
                                "GenericListCommand.element_has_no_key",
                                "The element {0} has no key attribute",
                                targetType);
                        report.failure(logger, msg);
                        return;
                    }
                    report.addSubActionsReport().setMessage(key);
                    map.put("key", key);
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.