Examples of ContextException


Examples of com.anrisoftware.globalpom.exceptions.ContextException

                NPE_ERROR_MESSAGE, "Foo");
    }

    void logContextException(Exception e, Object value) throws ContextException {
        throw logException(
                new ContextException(CONTEXT_ERROR, e).add(VALUE, value),
                CONTEXT_ERROR_MESSAGE, value);
    }
View Full Code Here

Examples of javax.enterprise.context.ContextException

            if(e instanceof ContextException)
            {
                throw (ContextException)e;
            }
           
            throw new ContextException(e);
        }       
    }
View Full Code Here

Examples of org.apache.aries.application.management.spi.repository.ContextException

      // add the suggestion to the list
      if (suggestion != null) {
        urlToBeInstalled.put(bundleToFind, suggestion);
      } else {
        throw new ContextException("Unable to find bundle "+bundleToFind.getContentName() + "/" + bundleToFind.getExactVersion());
      }
    }
   
    LOGGER.debug(LOG_EXIT, "getBundleSuggestions", new Object[] { urlToBeInstalled });
View Full Code Here

Examples of org.apache.avalon.framework.context.ContextException

            try {
                File applicationHome =
                    (File)context.get(AvalonContextConstants.APPLICATION_HOME);
                baseDirectory = applicationHome.toString();
            } catch (ContextException ce) {
                throw new ContextException("Encountered exception when resolving application home in Avalon context.", ce);
            } catch (ClassCastException cce) {
                throw new ContextException("Application home object stored in Avalon context was not of type java.io.File.", cce);
            }
            StringBuffer fileNameBuffer =
                new StringBuffer(128)
                    .append(baseDirectory)
                    .append(File.separator)
                            .append(fileName);
            fileName = fileNameBuffer.toString();
        }
        try {
            File returnValue = (new File(fileName)).getCanonicalFile();
            return returnValue;
        } catch (IOException ioe) {
            throw new ContextException("Encountered an unexpected exception while retrieving file.", ioe);
        }
    }
View Full Code Here

Examples of org.apache.avalon.framework.context.ContextException

            this.aFolder = mctx.getTheFolder(CONTEXT_FOLDER_ENTRY);

            Integer i = (Integer) ctx.get("param-integer:" + CONTEXT_UID_ENTRY);
            if (i == null) {
                String message = "Missing mandatory context entry " + String.valueOf(CONTEXT_UID_ENTRY);
                throw new ContextException(message);
            }
            this.msgUID = i.intValue();
        }
View Full Code Here

Examples of org.apache.avalon.framework.context.ContextException

            try {
                Integer i = (Integer) ctx.get("param-integer:" + CONTEXT_ID_ENTRY);
                this.msgId = i.intValue();
            } catch (ContextException ce) {
                String message = "Missing mandatory context entry " + String.valueOf(CONTEXT_ID_ENTRY);
                throw new ContextException(message);
            }
        }
View Full Code Here

Examples of org.apache.avalon.framework.context.ContextException

            this.aFolder = mctx.getTheFolder(CONTEXT_FOLDER_ENTRY);

            Integer i = (Integer) ctx.get("param-integer:" + CONTEXT_ID_ENTRY);
            if (i == null) {
                String message = "Missing mandatory context entry " + String.valueOf(CONTEXT_ID_ENTRY);
                throw new ContextException(message);
            }
            this.msgId = i.intValue();

            i = (Integer) ctx.get("param-integer:" + CONTEXT_PARTID_ENTRY);
            if (i == null) {
                String message = "Missing mandatory context entry " + String.valueOf(CONTEXT_PARTID_ENTRY);
                throw new ContextException(message);
            }
            this.partId = i.intValue();
        }
View Full Code Here

Examples of org.apache.avalon.framework.context.ContextException

                this.configurationFile = new DelayedRefreshSourceWrapper(urlSource,
                    1000L
                );

            } catch (IOException ioe) {
                throw new ContextException("Could not open configuration file.", ioe);
            } catch (Exception e) {
                throw new ContextException("contextualize(..) Exception", e);
            }
        }
    }
View Full Code Here

Examples of org.apache.avalon.framework.context.ContextException

            try {
                this.configurationFile = new URLSource((URL)context.get(Constants.CONTEXT_CONFIG_URL),
                                                       this.componentManager);
            } catch (IOException ioe) {
                getLogger().error("Could not open configuration file.", ioe);
                throw new ContextException("Could not open configuration file.", ioe);
            }
        }
    }
View Full Code Here

Examples of org.apache.avalon.framework.context.ContextException

                    1000L
                );

            } catch (IOException ioe) {
                getLogger().error("Could not open configuration file.", ioe);
                throw new ContextException("Could not open configuration file.", ioe);
            } catch (Exception e) {
                getLogger().error("contextualize(..) Exception", e);
                throw new ContextException("contextualize(..) Exception", e);
            }
        }
    }
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.