Package org.kapott.hbci.exceptions

Examples of org.kapott.hbci.exceptions.ParseErrorException


            try {
                ret=(SyntaxDE)(con.newInstance(new Object[]{res, new Integer(minsize), new Integer(maxsize)}));
            } catch (InstantiationException e) {
            } catch (IllegalAccessException e) {
            } catch (InvocationTargetException e) {
                throw new ParseErrorException(HBCIUtilsInternal.getLocMsg("EXCMSG_PROT_ERRSYNDE",path),(Exception)e.getCause());
            }
           
            if (ret!=null) {
                factory.addToUsedPool(ret);
            }
        } else {
            try {
                ret.init(res,minsize,maxsize);
                factory.addToUsedPool(ret);
            } catch (RuntimeException e) {
                factory.addToFreePool(ret);
                throw new ParseErrorException(HBCIUtilsInternal.getLocMsg("EXCMSG_PROT_ERRSYNDE",path),(Exception)e.getCause());
            }
        }
       
        return ret;
    }
View Full Code Here


        int len=temp.length();
        char preDelim=getPreDelim();
       
        if (preDelim!=(char)0 && temp.charAt(0)!=preDelim) {
            if (len==0) {
                throw new ParseErrorException(HBCIUtilsInternal.getLocMsg("EXCMSG_ENDOFSTRG",getPath()));
            }

            // HBCIUtils.log("error string: "+res.toString(),HBCIUtils.LOG_ERR);
            // HBCIUtils.log("current: "+getPath()+":"+type+"("+minsize+","+maxsize+")="+value,HBCIUtils.LOG_ERR);
            // HBCIUtils.log("predelimiter mismatch (required:"+getPreDelim()+" found:"+temp.charAt(0)+")",HBCIUtils.LOG_ERR);
            throw new PredelimErrorException(getPath(),Character.toString(preDelim),Character.toString(temp.charAt(0)));
        }

        this.value=SyntaxDEFactory.getInstance().createSyntaxDE(getType(),getPath(),res,minsize,maxsize);

        String valueString=value.toString(0);
        String predefined = predefs.get(getPath());
        if (predefined!=null) {
            if (!valueString.equals(predefined)) {
                throw new ParseErrorException(HBCIUtilsInternal.getLocMsg("EXCMSG_PREDEFERR",
                                                                  new Object[] {getPath(),predefined,value}));
            }
        }

        boolean atLeastOne=false;
View Full Code Here

                    res.replace(0,res.length(),save.toString());

                    /* wenn bisher weniger als die mindestanzahl geklappt hat,
                     dann exception werfen */
                    if (idx<minnum)
                        throw new ParseErrorException("reststring in "+getPath()+": "+res.toString(),e);

                    // es wird nur dann aufgehoert, weitere elemente dem aktuellen container hinzu-
                    // zufuegen, wenn ein element gefunden wurde, was offentsichlich nicht mehr dazu-
                    // gehoert (exception, aber nicht leeres element) --> dann stimmt naemlich entweder
                    // der predelimiter nicht, oder die syntax ist falsch
View Full Code Here

TOP

Related Classes of org.kapott.hbci.exceptions.ParseErrorException

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.