/** * Processes a warning. We just add an InfoMessage. */ public void warning (SAXParseException e) { _messages.add (new InfoMessage ( MessageFormat.format(MessageConstants.ERR_SAX_EXCEPTION,e.getMessage ().toString ()))); }
/** * Processes a parsing exception. An ill-formed piece * of XML will get a fatalError (I think), so we can assume * that any error here indicates only invalidity. */ public void error(SAXParseException e) { _valid = false; if (_nErrors == MAXERRORS) { _messages.add (new InfoMessage ( MessageFormat.format(MessageConstants.WRN_TOO_MANY_MESSAGES, MAXERRORS))); } else if (_nErrors < MAXERRORS) { int line = e.getLineNumber(); int col = e.getColumnNumber(); _messages.add (new ErrorMessage ( MessageFormat.format(MessageConstants.ERR_SAX_EXCEPTION,e.getMessage ().toString ()), "Line = " + line + ", Column = " + col)); } ++_nErrors; }
info.setMessage (new InfoMessage (MessageConstants.INF_DATA_CHUNK_TYPE_IGN + id));
/** Parse the IFD. * @param byteOffsetIsValid If true, allow offsets on odd byte boundaries * @param suppressErrors If true, return IFD even with errors * @return The offset of the next IFD */ public long parse(boolean byteOffsetIsValid, boolean suppressErrors) throws TiffException { try { return parse(byteOffsetIsValid); } catch (TiffException e) { // If we got a TiffException and we're suppressing errors, // cover over the exception and issue an info message; // but we can't follow the IFD chain further. if (suppressErrors) { _info.setMessage (new InfoMessage(e.getMessage(), e.getOffset())); return 0; } throw e; } }
info.setMessage(new InfoMessage
repInfo.setMessage(new InfoMessage(extractDiagnosisType(d), extractDiagnosisMessage(d)));
protected boolean doOutlineStuff(RepInfo info) { if (_outlineDict != null) { try { Property oprop = buildOutlinesProperty (_outlineDict, info); if (_showOutlines || _verbosity == Module.MAXIMUM_VERBOSITY) { if (oprop != null){ _docCatalogList.add(oprop); } } else if (!_skippedOutlinesReported) { // We report that we aren't reporting skipped outlines info.setMessage(new InfoMessage (MessageConstants.INF_OUTLINES_SKIPPED)); // PDF-HUL-132 _skippedOutlinesReported = true; } } catch (PdfException e) { info.setMessage(new ErrorMessage(e.getMessage(), _parser.getOffset())); e.disparage(info); // If it's just invalid, we can keep going return (e instanceof PdfInvalidException); } } return true; }
info.setMessage(new InfoMessage(e.getMessage(), e.getOffset())); return ifds; } catch (IOException e) {
!_showFonts && _verbosity != Module.MAXIMUM_VERBOSITY) { info.setMessage(new InfoMessage
if (isGzip) { _repInfo.setMessage(new InfoMessage (MessageConstants.INF_BINARY_FILTER_BOX_NOT_GZIP, _module.getFilePos ()));
info.setMessage (new InfoMessage (MessageConstants.INF_INFO_CHUNK_TYPE_IGN + id));
info.setMessage (new InfoMessage (MessageConstants.INF_DATA_CHUNK_TYPE_IGN + id));
info.setMessage(new InfoMessage
info.setMessage (new InfoMessage (MessageConstants.INF_DATA_CHUNK_TYPE_IGN + id));
if (chunkNumber == 1) { info.setMessage(new InfoMessage(MessageConstants.INF_EXIF_APP2_MULTI_REPORT, _nByte));
info.setMessage (new InfoMessage (CoreMessageConstants.INF_FILE_EMPTY));
InfoMessage im = new InfoMessage(Utf8MessageConstants.INF_BOM_MARK_PRESENT, 0); info.setMessage(im);
_repInfo.setMessage (new InfoMessage (MessageConstants.INF_FRAGMENT_LIST_BOX_EXT_FILE_REFERENCE, _module.getFilePos()));
/** * Reports the results of the characterization. * @param reader The GZIP reader, which has read the GZIP-file. * @param repInfo The representation info, where to report the results. * @throws JhoveException * @throws IOException */ private void reportResults(GzipReader reader, RepInfo repInfo) throws JhoveException, IOException { Diagnostics<Diagnosis> diagnostics = reader.diagnostics; if (diagnostics.hasErrors()) { for (Diagnosis d : diagnostics.getErrors()) { repInfo.setMessage(new ErrorMessage(extractDiagnosisType(d), extractDiagnosisMessage(d))); } repInfo.setConsistent(false); } if (diagnostics.hasWarnings()) { // Report warnings on source object. for (Diagnosis d : diagnostics.getWarnings()) { repInfo.setMessage(new InfoMessage(extractDiagnosisType(d), extractDiagnosisMessage(d))); } } repInfo.setProperty(new Property("Records", PropertyType.PROPERTY, PropertyArity.LIST, entryProperties)); repInfo.setSize(reader.getConsumed()); }
info.setMessage(new InfoMessage( MessageConstants.INF_EXIF_REPORT_REQUIRES_TIFF, _nByte)); skipBytes(_dstream, length - 8, this);