Cosimo Lupo
c6b2ba5286
[varLib.merge] fix NameError: 'NotANone'
...
Fixes https://github.com/fonttools/fonttools/issues/2712
2022-07-29 13:05:26 +02:00
Just van Rossum
8c19828d7e
[varLib.merge] Fix for error during error reporting ( #2689 )
...
* work around error during error reporting, as reported in #2688
* Use stack[-1] (the table tag) as per feedback
2022-07-12 20:59:29 +02:00
Cosimo Lupo
5d52124e49
varLib.errors: allow to give extra context as to where an error occurs in the optional 'cause'
2022-07-04 18:52:20 +01:00
Cosimo Lupo
bc8f1cfac4
varLib.errors: more informative message with unsupported/inconsistent formats
2022-06-21 17:27:12 +01:00
Cosimo Lupo
c34ff0d474
[varLib.merger/errors] fix undefined exception name
...
The exception UnsupportedFormat was defined and then redefined with the same name in varLib.errors, and imported twice from varLib.merger, probably as result of a sweeping find/replace.
Rename it 'InconsistentFormats' as originally intended.
2022-06-17 11:24:56 +01:00
Cosimo Lupo
8d992508a4
varLib.errors: fix confusing error message when FeatureCount is different
...
see https://github.com/googlefonts/fontmake/issues/894
2022-06-13 12:14:25 +01:00
Cosimo Lupo
513b7d9a36
varLib.errors: use getBestFullName to print name of master ttf
2022-06-13 12:08:40 +01:00
Cosimo Lupo
ac4d5611ac
VarLibMergeError has cause and stack attributes, use them in subclasses
...
https://github.com/googlefonts/fontmake/issues/858
2022-02-25 15:39:37 +00:00
Cosimo Lupo
180d8d7de9
varLib.errors: fix typo
...
Fixes #2534
2022-02-25 15:05:27 +00:00
Cosimo Lupo
72004fcd7e
VarLibMergeError first parameter must be a Merger object
...
a lot of places instead pass in the 'self' parameter, incorrectly assuming that is a Merger.
This is meant to fix 'AttributeError: 'dict' object has no attribute 'ttfs'' as reported in https://github.com/googlefonts/fontmake/issues/766#issuecomment-836576341
2021-05-13 15:40:44 +01:00
Simon Cozens
baf6c5d1e1
Remove pass if we have a docstring
2021-03-19 10:48:58 +00:00
Simon Cozens
5d7c826b0b
Make CFF merge errors inherit differently
2021-03-19 10:40:02 +00:00
Simon Cozens
bfe4bad37b
Use kwargs and explicit stack
2021-03-19 10:38:15 +00:00
Simon Cozens
956087eb81
super doesn’t magically call its own methods
2021-03-18 21:23:34 +00:00
Simon Cozens
3e0a87a146
Shorten exception names
2021-03-18 20:58:11 +00:00
Simon Cozens
6c547864b6
Use individual exception classes instead of enum
2021-03-18 15:49:49 +00:00
Simon Cozens
02ebcf8077
Redundant computation
2021-03-17 14:59:36 +00:00
Simon Cozens
bfc4ac9524
Compare enums by identity
2021-03-17 14:59:11 +00:00
Simon Cozens
539b3cd71d
Special case must actually be special-cased
2021-03-17 11:52:50 +00:00
Simon Cozens
939962f858
Check we can actually get a name
2021-03-17 11:52:35 +00:00
Simon Cozens
1bf3cccead
Provide additional information for a common failure
2021-03-15 12:51:02 +00:00
Simon Cozens
46bd7a7e97
Many fixes...
2021-03-15 12:50:47 +00:00
Simon Cozens
7fc2e37e41
Try harder to get a name from file being merged
2021-03-15 12:00:31 +00:00
Simon Cozens
1abfbb6cc7
Explain merge errors in designer-friendly terms
2021-03-13 22:30:27 +00:00
Josh Hadley
aafc814088
[varlib] Add VarLibCFFHintTypeMergeError
2021-03-05 08:47:33 -08:00
Nikolaus Waxweiler
55bfa4e076
Introduce errors submodule
2020-02-13 14:58:10 +00:00