Is there a fallback when a Twig extension is not enabled? So I have a plugin with a Twig Extension that does it's thing. If I were to disable my plugin I will get the expected error:


  The "extensionName" extension is not enabled.


Whenever I'm referring to anything to do with my plugin, I rely on the usual "is defined", "is not empty", "|default()", etc... options as appropriate fallbacks/checks incase my plugin fails. 

However, short of doing a full check on wether my plugin is installed everytime, there doesn't seem to be an elegant solution for checking extensions are enabled until it's too late (and the page fails to load). 

Any ideas on a workaround?
I can't think of a native way to do this, but Twig does have a hasExtension method, which you could make use of in a Craft plugin.  But if you wrote a plugin to utilize it (similar to this) obviously that wouldn't help if the plugin was disabled or uninstalled.

Alternatively, you can add this as a feature request to add to Craft natively. If you go that route, be sure and go into details on your specific use-case as I'm not sure I'm following it 100% here.