Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * To change this template, choose Tools | Templates
  * and open the template in the editor.
  */
 
 package it.grabz.grabzit.enums;
 
 import java.util.Map;

Author(s):
GrabzIt
public enum ErrorCode {
    SUCCESS(0),
    PARAMETERNOURL(100),
    PARAMETERINVALIDURL(101),
    PARAMETERNONEXISTANTURL(102),
    PARAMETERMISSINGAPPLICATIONKEY(103),
    PARAMETERUNRECOGNISEDAPPLICATIONKEY(104),
    PARAMETERMISSINGSIGNATURE(105),
    PARAMETERINVALIDSIGNATURE(106),
    PARAMETERINVALIDFORMAT(107),
    PARAMETERINVALIDCOUNTRYCODE(108),
    PARAMETERDUPLICATEIDENTIFIER(109),
    PARAMETERMATCHINGRECORDNOTFOUND(110),
    PARAMETERINVALIDCALLBACKURL(111),
    PARAMETERNONEXISTANTCALLBACKURL(112),
    PARAMETERIMAGEWIDTHTOOLARGE(113),
    PARAMETERIMAGEHEIGHTTOOLARGE(114),
    PARAMETERBROWSERWIDTHTOOLARGE(115),
    PARAMETERBROWSERHEIGHTTOOLARGE(116),
    PARAMETERDELAYTOOLARGE(117),
    PARAMETERINVALIDBACKGROUND(118),
    PARAMETERINVALIDINCLUDELINKS(119),
    PARAMETERINVALIDINCLUDEOUTLINE(120),
    PARAMETERINVALIDPAGESIZE(121),
    PARAMETERINVALIDPAGEORIENTATION(122),
    PARAMETERVERTICALMARGINTOOLARGE(123),
    PARAMETERHORIZONTALMARGINTOOLARGE(124),
    PARAMETERINVALIDCOVERURL(125),
    PARAMETERNONEXISTANTCOVERURL(126),
    PARAMETERMISSINGCOOKIENAME(127),
    PARAMETERMISSINGCOOKIEDOMAIN(128),
    PARAMETERINVALIDCOOKIENAME(129),
    PARAMETERINVALIDCOOKIEDOMAIN(130),
    PARAMETERINVALIDCOOKIEDELETE(131),
    PARAMETERINVALIDCOOKIEHTTP(132),
    PARAMETERINVALIDCOOKIEEXPIRY(133),
    PARAMETERINVALIDCACHEVALUE(134),
    PARAMETERINVALIDDOWNLOADVALUE(135),
    PARAMETERINVALIDSUPRESSVALUE(136),
    PARAMETERMISSINGWATERMARKIDENTIFIER(137),
    PARAMETERINVALIDWATERMARKIDENTIFIER(138),
    PARAMETERINVALIDWATERMARKXPOS(139),
    PARAMETERINVALIDWATERMARKYPOS(140),
    PARAMETERMISSINGWATERMARKFORMAT(141),
    PARAMETERWATERMARKTOOLARGE(142),
    PARAMETERMISSINGPARAMETERS(143),
    PARAMETERQUALITYTOOLARGE(144),
    PARAMETERQUALITYTOOSMALL(145),    
    NETWORKSERVEROFFLINE(200),
    NETWORKGENERALERROR(201),
    NETWORKDDOSATTACK(202),
    RENDERINGERROR(300),
    RENDERINGMISSINGSCREENSHOT(301),
    GENERICERROR(400),
    UPGRADEREQUIRED(500),
    FILESAVEERROR(600),
    FILENONEXISTANTPATH(601);
    
    private int value;
    
    private static Map<IntegerErrorCodemap = new HashMap<IntegerErrorCode>();
    ErrorCode(int value)
    {
        this. = value;
    }
    
    static {
        for (ErrorCode errorCode : ErrorCode.values()) {
            .put(errorCode.getValue(), errorCode);
        }
    }
    public static ErrorCode valueOf(int value) {
        return .get(value);
    }    
    
    

Returns:
the value
    public int getValue() {
        return ;
    }
New to GrepCode? Check out our FAQ X