Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 74023b1

Browse files
committed
Swap RuntimeError for ValueError in AnchoredOffsetBox
1 parent 2e4b17e commit 74023b1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/offsetbox.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1046,9 +1046,9 @@ def __init__(self, loc,
10461046
try:
10471047
loc = self.codes[loc]
10481048
except KeyError:
1049-
raise RuntimeError('Unrecognized location "%s". Valid '
1050-
'locations are\n\t%s\n'
1051-
% (loc, '\n\t'.join(self.codes)))
1049+
raise ValueError('Unrecognized location "%s". Valid '
1050+
'locations are\n\t%s\n'
1051+
% (loc, '\n\t'.join(self.codes)))
10521052

10531053
self.loc = loc
10541054
self.borderpad = borderpad

0 commit comments

Comments
 (0)