summaryrefslogtreecommitdiff
path: root/fpdf_test.go
diff options
context:
space:
mode:
authorKurt Jung <kurt.w.jung@gmail.com>2015-07-07 05:45:01 -0400
committerKurt Jung <kurt.w.jung@gmail.com>2015-07-07 05:45:01 -0400
commit8e1fd6fdd35517c1035ff353ca3cdc1e88bb82f9 (patch)
tree98fe0baada5901198c98c7e18ef53ec3635e90a5 /fpdf_test.go
parentfc105cd6b119a1f2f14cc411aeb881dca26fab23 (diff)
Explain error handling in package example
Diffstat (limited to 'fpdf_test.go')
-rw-r--r--fpdf_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/fpdf_test.go b/fpdf_test.go
index eaed7d8..da4b930 100644
--- a/fpdf_test.go
+++ b/fpdf_test.go
@@ -158,7 +158,10 @@ func summary(err error, fileStr string) {
// since only core fonts are used (in this case Arial, a synonym for
// Helvetica), an empty string can be specified for the font directory in the
// call to New(). Note also that the exampleFilename and summary functions are
-// local to the test file and are not part of the gofpdf library.
+// local to the test file and are not part of the gofpdf library. If an error
+// occurs at some point during the construction of the document, subsequent
+// method calls exit immediately and the error is finally retreived with the
+// output call where it can be handled by the application.
func Example() {
pdf := gofpdf.New("P", "mm", "A4", "")
pdf.AddPage()