Package flex.messaging

Examples of flex.messaging.LocalizedException


    private static void checkCategory(String category)
    {
        if (category == null || category.length() == 0)
        {
            // Categories must be at least one character in length.
            LocalizedException ex = new LocalizedException();
            ex.setMessage(INVALID_CATEGORY);
            throw ex;
        }

        if (hasIllegalCharacters(category) || (category.indexOf("*") != -1))
        {
            // Categories can not contain any of the following characters: 'INVALID_CHARS'
            LocalizedException ex = new LocalizedException();
            ex.setMessage(INVALID_CATEGORY_CHARS, new Object[]{INVALID_CHARS});
            throw ex;
        }
    }
View Full Code Here


    {
        // check for invalid characters
        if (Log.hasIllegalCharacters(value))
        {
            //Error for filter '{filter}'. The following characters are not valid: {Log.INVALID_CHARS}
            LocalizedException ex = new LocalizedException();
            ex.setMessage(INVALID_FILTER_CHARS, new Object[]{value, Log.INVALID_CHARS});
            throw ex;
        }

        int index = value.indexOf("*");
        if ((index >= 0) && (index != (value.length() - 1)))
        {
            //Error for filter '{filter}'. '*' must be the right most character.
            LocalizedException ex = new LocalizedException();
            ex.setMessage(INVALID_FILTER_STAR, new Object[]{value});
            throw ex;
        }
    }
View Full Code Here

TOP

Related Classes of flex.messaging.LocalizedException

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.