Package org.openbel.framework.common

Examples of org.openbel.framework.common.BELRuntimeException


        try {
            attemptSystemConfiguration();
        } catch (IOException e) {
            // Can't recover from this
            final String err = SYSCFG_READ_FAILURE;
            throw new BELRuntimeException(err, ExitCode.UNRECOVERABLE_ERROR, e);
        }
    }
View Full Code Here


    protected void initializeDefaults() {
        String err = "A BEL Framework system configuration must be present";
        if (configurationFile != null) {
            err += " (using " + configurationFile + ")";
        }
        throw new BELRuntimeException(err, MISSING_SYSTEM_CONFIGURATION);
    }
View Full Code Here

                bldr.append(" ");
                bldr.append(setting);
            }
            bldr.append(")");
            final String err = bldr.toString();
            throw new BELRuntimeException(err, UNRECOVERABLE_ERROR);
        }

        // Five-by-five.
    }
View Full Code Here

        if (!path.exists()) {
            // ... try creating it...
            if (!path.mkdirs()) {
                // ... or die trying.
                String err = DIRECTORY_CREATION_FAILED.concat(path.toString());
                throw new BELRuntimeException(err, UNRECOVERABLE_ERROR);
            }
            return;
        }

        // ... can't write to it.
        String err = CANT_WRITE_TO_PATH.concat(path.toString());
        throw new BELRuntimeException(err, UNRECOVERABLE_ERROR);
    }
View Full Code Here

                case REGULAR_EXPRESSION:
                    writer.write(" PATTERN "
                            + doubleQuote(annotationDefinition.getValue()));
                    break;
                default:
                    throw new BELRuntimeException(
                            "Unrecognized annotation type: "
                                    + annotationDefinition.getType(),
                            ExitCode.CONVERSION_FAILURE);
                }
            }
View Full Code Here

            } else {
                List<String> currentValues =
                        currentAnnotationMap.get(effEntry.getKey());
                List<String> effectiveValues = effEntry.getValue();
                if (currentValues == null || effectiveValues == null) {
                    throw new BELRuntimeException("Invalid annotation value",
                            ExitCode.PARSE_ERROR);
                }
                //set annotation that exist in both map, but values are different in effective map
                //this will override the annotation
                if (!currentValues.equals(effectiveValues)) {
View Full Code Here

    protected void
            setAnnotation(String name, List<String> values, Writer writer)
                    throws IOException, BELRuntimeException {
        if (values == null || values.isEmpty()) {
            throw new BELRuntimeException("Invalid annotation value",
                    ExitCode.PARSE_ERROR);
        }
        writer.write("SET " + name + " = ");

        if (values.size() == 1) {
View Full Code Here

TOP

Related Classes of org.openbel.framework.common.BELRuntimeException

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.