Package org.apache.wiki.api.exceptions

Examples of org.apache.wiki.api.exceptions.PluginException


                log.info( "Plugin failed while executing:", t );
                if( debug ) {
                    return stackTrace( params, t );
                }

                throw new PluginException( rb.getString( "plugin.error.failed" ), t );
            }

        } catch( ClassCastException e ) {
            throw new PluginException( MessageFormat.format( rb.getString( "plugin.error.notawikiplugin" ), classname ), e );
        }
    }
View Full Code Here


                return execute( context, plugin, arglist );
            }
        } catch( NoSuchElementException e ) {
            String msg =  "Missing parameter in plugin definition: "+commandline;
            log.warn( msg, e );
            throw new PluginException( MessageFormat.format( rb.getString( "plugin.error.missingparameter" ), commandline ) );
        } catch( IOException e ) {
            String msg = "Zyrf.  Problems with parsing arguments: "+commandline;
            log.warn( msg, e );
            throw new PluginException( MessageFormat.format( rb.getString( "plugin.error.parsingarguments" ), commandline ) );
        }

        // FIXME: We could either return an empty string "", or
        // the original line.  If we want unsuccessful requests
        // to be invisible, then we should return an empty string.
View Full Code Here

                log.info( msg );
            } else {
                plugin = pluginInfo.newPluginInstance(m_searchPath, m_externalJars);
            }
        } catch( ClassNotFoundException e ) {
            throw new PluginException( MessageFormat.format( rb.getString( "plugin.error.couldnotfind" ), pluginName ), e );
        } catch( InstantiationException e ) {
            throw new PluginException( MessageFormat.format( rb.getString( "plugin.error.cannotinstantiate" ), pluginName ), e );
        } catch( IllegalAccessException e ) {
            throw new PluginException( MessageFormat.format( rb.getString( "plugin.error.notallowed" ), pluginName ), e );
        } catch( Exception e ) {
            throw new PluginException( MessageFormat.format( rb.getString( "plugin.error.instantationfailed" ), pluginName ), e );
        }
        return plugin;
    }
View Full Code Here

                currentDiv.addContent(getLink(context.getURL(WikiContext.VIEW,name),name));
            }
           
        } catch( ProviderException e ) {
            log.warn("could not load page index",e);
            throw new PluginException( e.getMessage() );
        }
        // serialize to raw format string (no changes to whitespace)
        XMLOutputter out = new XMLOutputter(Format.getRawFormat());
        return out.outputString(masterDiv);
    }
View Full Code Here

            try {
                if (plugin != null && plugin instanceof ParserStagePlugin) {
                    ((ParserStagePlugin) plugin).executeParser(this, context, params);
                }
            } catch (ClassCastException e) {
                throw new PluginException(MessageFormat.format(rb.getString("plugin.error.notawikiplugin"), getPluginName()), e);
            }
        }
    }
View Full Code Here

            log.error("Invalid type offered in parsing plugin arguments.", e);
            throw new InternalWikiException("Oops, someone offered !String!");
        } catch (NoSuchElementException e) {
            String msg = "Missing parameter in plugin definition: " + commandline;
            log.warn(msg, e);
            throw new PluginException(msg);
        } catch (IOException e) {
            String msg = "Zyrf.  Problems with parsing arguments: " + commandline;
            log.warn(msg, e);
            throw new PluginException(msg);
        }

        return null;
    }
View Full Code Here

            ResourceBundle rb )
            throws PluginException
    {
        String inputName = pluginParams.get( PARAM_INPUTNAME );
        if ( inputName == null ) {
            throw new PluginException( rb.getString( "formselect.namemissing" ) );
        }
   
        String inputValue = pluginParams.get( PARAM_VALUE );
        String previousValue = ctxValues.get( inputName );
        //
View Full Code Here

        String inputName = params.get(PARAM_INPUTNAME);
        String rows = params.get(PARAM_ROWS);
        String cols = params.get(PARAM_COLS);

        if ( inputName == null ) {
          throw new PluginException( rb.getString( "formtextarea.namemissing" ) );
        }

        // In order to isolate posted form elements into their own
        // map, prefix the variable name here. It will be stripped
        // when the handler plugin is executed.
View Full Code Here

        String inputType  = params.get( PARAM_TYPE );
        String size       = params.get( PARAM_SIZE );
        ResourceBundle rb = Preferences.getBundle( ctx, WikiPlugin.CORE_PLUGINS_RESOURCEBUNDLE );

        if ( inputName == null ) {
            throw new PluginException( rb.getString( "forminput.namemissing" ) );
        }
        if ( inputValue == null ) {
            inputValue = "";
        }
       
View Full Code Here

TOP

Related Classes of org.apache.wiki.api.exceptions.PluginException

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.