@@ -275,7 +275,7 @@ def _layout_value(self):
275
275
def layout (self , value ):
276
276
if (not isinstance (value , Component ) and
277
277
not isinstance (value , collections .Callable )):
278
- raise Exception (
278
+ raise exceptions . NoLayoutException (
279
279
''
280
280
'Layout must be a dash component '
281
281
'or a function that returns '
@@ -301,7 +301,7 @@ def index_string(self, value):
301
301
)
302
302
missing = [missing for check , missing in checks if not check ]
303
303
if missing :
304
- raise Exception (
304
+ raise exceptions . InvalidIndexException (
305
305
'Did you forget to include {} in your index string ?' .format (
306
306
', ' .join ('{%' + x + '%}' for x in missing )
307
307
)
@@ -475,14 +475,14 @@ def _generate_meta_html(self):
475
475
# Serve the JS bundles for each package
476
476
def serve_component_suites (self , package_name , path_in_package_dist ):
477
477
if package_name not in self .registered_paths :
478
- raise exceptions .InvalidResourceError (
478
+ raise exceptions .DependencyException (
479
479
'Error loading dependency.\n '
480
480
'"{}" is not a registered library.\n '
481
481
'Registered libraries are: {}'
482
482
.format (package_name , list (self .registered_paths .keys ())))
483
483
484
484
elif path_in_package_dist not in self .registered_paths [package_name ]:
485
- raise exceptions .InvalidResourceError (
485
+ raise exceptions .DependencyException (
486
486
'"{}" is registered but the path requested is not valid.\n '
487
487
'The path requested: "{}"\n '
488
488
'List of registered paths: {}'
@@ -546,7 +546,7 @@ def index(self, *args, **kwargs): # pylint: disable=unused-argument
546
546
547
547
if missing :
548
548
plural = 's' if len (missing ) > 1 else ''
549
- raise Exception (
549
+ raise exceptions . InvalidIndexException (
550
550
'Missing element{pl} {ids} in index.' .format (
551
551
ids = ', ' .join (missing ),
552
552
pl = plural
0 commit comments