Bug 22216 - FOP doesn't detect missing images (external graphics)
Summary: FOP doesn't detect missing images (external graphics)
Status: CLOSED FIXED
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: images (show other bugs)
Version: 0.20.5
Hardware: PC other
: P3 critical
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-07 13:37 UTC by Joachim Unger
Modified: 2012-04-01 07:10 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joachim Unger 2003-08-07 13:37:49 UTC
processMessage() retrieves no information about errors when images, that are 
included within the xsl, are missing. This error is serious, because it is not 
possible to implement an own logger (extending log4j logger) that overwrites 
the error()-method. We need the information when pictures are missing.
Comment 1 Joachim Unger 2003-08-08 08:41:43 UTC
An idea to solve the problem: Put some additional actions into the contructors 
of class FopImageException, like this: 

public class FopImageException extends Exception {
    public FopImageException() {
        super();
//	JUN 2003-08-08 -- appended lines
	MessageHandler.error("No message text available." + this.getMessage());
//	JUN 2003-08-08 
    }

    public FopImageException(String message) {
        super(message);
//	JUN 2003-08-08 -- appended lines
	MessageHandler.error(message);
//	JUN 2003-08-08 
    }

}

Comment 2 Joachim Unger 2003-08-08 11:14:26 UTC
A 2nd solution is to stop the processing. 
This may be more useful in many cases. 
I changed org.apache.fop.fo.flow.ExternalGraphic.layout():
...
catch (MalformedURLException urlex) {
  // bad URL
  log.error("Error while creating area : " + urlex.getMessage());
  throw new FOPException ("Error while creating area : " + urlex.getMessage());
} 
catch (FopImageException imgex) {
  // image error
  log.error("Error while creating area : " + imgex.getMessage());
  throw new FOPException ("Error while creating area : " + imgex.getMessage());
}
...
Comment 3 Pascal Sancho 2007-11-20 00:29:43 UTC
Fixed in FOP 0.94 and probably earlier versions
Comment 4 Glenn Adams 2012-04-01 07:10:40 UTC
batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed