Bug ID: 62176
           Summary: Flow: improve exception handling, reuse more core
           Product: MediaWiki extensions
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: Flow
       Web browser: ---
   Mobile Platform: ---

Flow bypasses a lot of core's Exception.php, so its exceptions work
differently. For example, insufficient permissions or invalid action in a Flow
URL on should not display an errorbox containing a Fatal
exception (which isn't Fatal and I think isn't counted as an exception). For

Furthermore core exceptions provide more helpful information
  Internal error
  Insufficient permissions to access the content.
  <a stack trace (or a pink errorbox)>

gives a helpful
  Permission error
  You do not have permission to delete this page, for the following reasons:
  The action you have requested is limited to users in the group:

I think most Flow exception classes could inherit from core's ErrorPageError
and just pass a suitable title and 'flow-error-' . $flowErrorKey, plus any
additional useful debugging information in __construct.  Meanwhile
PermissionException could inherit from PermissionsError andthrowers should pass
it the failed permission ('flow-edit-post', etc.), and Flow.i18n.php should
have messages for 'action-flow-edit-post', 'action-flow-suppress-topic', etc.

I added a bunch of comments to
regarding this point.  If I'm misguided then that file should have a comment
explaining why it's done the way it is.

You are receiving this mail because:
You are on the CC list for the bug.
Wikibugs-l mailing list

Reply via email to