A function that handles errors raised in goog.storage. Since some places in
the goog.storage codebase throw strings instead of Error objects, we accept
these as a valid parameter type. It supports the following arguments:
- The raised error (either in Error or string form);
- The operation name which triggered the error, as defined per the
ErrorHandlingMechanism.Operation enum;
- The key that is passed to a storage method;
- An optional value that is passed to a storage method (only used in set
operations).