public static void _validateResult()

in shared/java/Codec.java [293:322]


    public static void _validateResult(int result) {
        switch (result) {
            case 1: // kIncompleteInput
                throw new IllegalArgumentException("Incomplete input: A partial image was generated.");

            case 2: // kErrorInInput
                throw new IllegalArgumentException("Error in input");

            case 3: // kInvalidConversion
                throw new IllegalArgumentException("Invalid conversion: The generator cannot convert to match the request, ignoring dimensions");

            case 4: // kInvalidScale
                throw new IllegalArgumentException("Invalid scale: The generator cannot scale to requested size");

            case 5: // kInvalidParameters
                throw new IllegalArgumentException("Invalid parameter: Parameters (besides info) are invalid. e.g. NULL pixels, rowBytes too small, etc");

            case 6: // kInvalidInput
                throw new IllegalArgumentException("Invalid input: The input did not contain a valid image");

            case 7: // kCouldNotRewind
                throw new UnsupportedOperationException("Could not rewind: Fulfilling this request requires rewinding the input, which is not supported for this input");

            case 8: // kInternalError
                throw new RuntimeException("Internal error");

            case 9: // kUnimplemented
                throw new UnsupportedOperationException("Unimplemented: This method is not implemented by this codec");
        }
    }