From 8e1fd6fdd35517c1035ff353ca3cdc1e88bb82f9 Mon Sep 17 00:00:00 2001 From: Kurt Jung Date: Tue, 7 Jul 2015 05:45:01 -0400 Subject: Explain error handling in package example --- fpdf_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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() -- cgit v1.2.1-24-ge1ad