public
Description: Fast, Nimble PDF Writer for Ruby
Homepage: http://prawn.majesticseacreature.com
Clone URL: git://github.com/sandal/prawn.git
prawn / lib / prawn / errors.rb
100644 49 lines (38 sloc) 1.586 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# encoding: utf-8
 
# errors.rb : Implements custom error classes for Prawn
#
# Copyright April 2008, Gregory Brown. All Rights Reserved.
#
# This is free software. Please see the LICENSE and COPYING files for details.
 
module Prawn
  module Errors
     
     # This error is raised when Prawn::PdfObject() encounters a Ruby object it
     # cannot convert to PDF
     #
     class FailedObjectConversion < StandardError; end
     
     # This error is raised when Document#page_layout is set to anything
     # other than :portrait or :landscape
     #
     class InvalidPageLayout < StandardError; end
     
     # This error is raised when Prawn cannot find a specified font
     #
     class UnknownFont < StandardError; end
 
     # This error is raised when Prawn is being used on a M17N aware VM,
     # and the user attempts to add text that isn't compatible with UTF-8
     # to their document
     #
     class IncompatibleStringEncoding < StandardError; end
     
     # This error is raised when Prawn encounters an unknown key in functions
     # that accept an options hash. This usually means there is a typo in your
     # code or that the option you are trying to use has a different name than
     # what you have specified.
     #
     class UnknownOption < StandardError; end
     
     # This error is raised when table data is malformed
     #
     class InvalidTableData < StandardError; end
 
     # This error is raised when an empty or nil table is rendered
     #
     class EmptyTable < StandardError; end
     
  end
end