logo       


Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: Apache is exiting....: msg#00505

Subject: Re: Apache is exiting....
Hi Chris

On Thu, 27 Feb 2003 09:33:07 -0500
"Chris Faust" <CFaust@xxxxxxxxxxxx> wrote:

> Hey Paolo,
> 
> Did you try to add some die statements to see if it made any difference,
> so something like:
> 
> use Image::Magick;
> my $image=Image::Magick->new(size=>'75x75');
> $image->Read('null:white');
>       die &display_error("Read Error Error: Image: null:white $image
>       \n") if
> ($image);
> my @x = $image->QueryFontMetrics
> font=>'@/usr/X11R6/lib/X11/fonts/ttf/Ritalin.ttf',text=>'X',
> pointsize=>12);
>       die &display_error("ImFont Query Error: @x $image") if ($image);
> 
> Works for me, then I just have a sub called "display_error" that prints
> the message and error out in a browser, but you could make that anything
> you want.

In this example, it would croak (let's not call it "die", because it
doesn't) on the $image->QueryFontMetrics() call, before it reaches
the die statement. Yes, I have made sure exactly where it dies. I don't
think one can do much better than this:

===================================================================
use Image::Magick;
use Error qw (:try);

my $image=Image::Magick->new(size=>'75x75');
$image->Read('null:white');

try {
        my @x = 
$image->QueryFontMetrics(font=>'@/usr/X11R6/lib/X11/fonts/ttf/Ritalin.ttf',text=>'X',
 pointsize=>12);
        die "Got past QueryFontMetrics()";
}
catch Error with {
        warn "trapped an exception";
};
warn "Completed";
===================================================================

This gives the same output as the original post:
Exception 415: UnableToReadFont (@/usr/X11R6/lib/X11/fonts/ttf/Ritalin.ttf) at 
./xxxxxxx line 12.

Thanks

Paolo




Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
db.firebase.por...    text.xml.xalan....    qnx.openqnx.dev...    user-groups.zar...    internationaliz...    kde.devel.konve...    finance.e-gold....    emacs.latex.pre...    gis.therion/200...    web.webmin.gene...    yellowdog.gener...    vserver/2003-08...    redhat.release....    sysutils.tivoli...    xfree86.expert/...    mail.becky.user...    hardware.netapp...    netbsd.ports.xe...    python.distutil...    boot-loaders.gr...    culture.interne...    java.springfram...    activedir/2006-...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe