Skip to content

Commit

Permalink
Quick: Explain Try/Catch for Plugin Restoration
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleyboar committed Aug 31, 2021
1 parent 7c2f78a commit 31e9da8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
# SEE: https://github.com/django-cms/djangocms-bootstrap4/blob/master/djangocms_bootstrap4/contrib/bootstrap4_link/cms_plugins.py#L81
plugin_pool.register_plugin(LinkPlugin)

# To avoid server crash if Boostrap plugin is not registered
# CAVEAT: If import statement fails for reason other than Bootstrap presence,
# then that failure, and the failure of this plugin, is silent
except ImportError:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# SEE: https://github.com/django-cms/djangocms-bootstrap4/blob/master/djangocms_bootstrap4/contrib/bootstrap4_picture/cms_plugins.py#L54
plugin_pool.register_plugin(PicturePlugin)

# To avoid server crash if Boostrap plugin is not registered
# CAVEAT: If import statement fails for reason other than Bootstrap presence,
# then that failure, and the failure of this plugin, is silent
except ImportError:
Expand Down

0 comments on commit 31e9da8

Please sign in to comment.