git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9bcdd3d
)
ruby interface: raise an exception if we couldn't open a file
author
Matthias Kramm
<kramm@quiss.org>
Thu, 7 Jan 2010 02:07:16 +0000
(18:07 -0800)
committer
Matthias Kramm
<kramm@quiss.org>
Thu, 7 Jan 2010 02:07:16 +0000
(18:07 -0800)
lib/ruby/gfx.c
patch
|
blob
|
history
diff --git
a/lib/ruby/gfx.c
b/lib/ruby/gfx.c
index
661d8ef
..
958ce40
100644
(file)
--- a/
lib/ruby/gfx.c
+++ b/
lib/ruby/gfx.c
@@
-63,6
+63,9
@@
static VALUE doc_initialize(VALUE cls, VALUE _filename)
const char*filename = StringValuePtr(_filename);
doc->fontlist = gfxfontlist_create();
doc->doc = pdfdriver->open(pdfdriver, filename);
+ if(!doc->doc) {
+ rb_raise(rb_eIOError, "couldn't open %s", filename);
+ }
return cls;
}