@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Install an uncaught exception handler in Aphlict

Summary:
Ref T5373. This seems to work pretty much correctly.

Also stop popping bubbles and just use the log, since users find the bubbles confusing/not useful and they're not great for developers either.

Future diffs will expose more user-facing stuff.

Test Plan: Added `throw` to AphlictClient.as, got a log in the parent window.

Reviewers: joshuaspence

Reviewed By: joshuaspence

Subscribers: epriestley

Maniphest Tasks: T5373

Differential Revision: https://secure.phabricator.com/D9698

+15 -17
+1 -1
support/aphlict/client/src/Aphlict.as
··· 34 34 ExternalInterface.call('JX.Aphlict.didReceiveEvent', type, object); 35 35 } 36 36 37 - final protected function error(error:Error):void { 37 + final protected function error(error:Object):void { 38 38 this.externalInvoke('error', error.toString()); 39 39 } 40 40
+9 -1
support/aphlict/client/src/AphlictClient.as
··· 4 4 import flash.external.ExternalInterface; 5 5 import flash.utils.Dictionary; 6 6 import flash.utils.Timer; 7 - 7 + import flash.events.UncaughtErrorEvent; 8 8 9 9 final public class AphlictClient extends Aphlict { 10 10 ··· 37 37 public function AphlictClient() { 38 38 super(); 39 39 40 + loaderInfo.uncaughtErrorEvents.addEventListener( 41 + UncaughtErrorEvent.UNCAUGHT_ERROR, 42 + this.uncaughtErrorHandler); 43 + 40 44 ExternalInterface.addCallback('connect', this.externalConnect); 41 45 ExternalInterface.call( 42 46 'JX.Stratcom.invoke', 43 47 'aphlict-component-ready', 44 48 null, 45 49 {}); 50 + } 51 + 52 + private function uncaughtErrorHandler(event:UncaughtErrorEvent):void { 53 + this.error(event.error.toString()); 46 54 } 47 55 48 56 public function externalConnect(
+5 -15
webroot/rsrc/js/application/aphlict/behavior-aphlict-listen.js
··· 8 8 * javelin-dom 9 9 * javelin-json 10 10 * javelin-router 11 + * javelin-util 11 12 * phabricator-notification 12 13 */ 13 14 ··· 54 55 // a request to Phabricator to get notification details. 55 56 function onaphlictmessage(type, message) { 56 57 switch (type) { 57 - case 'error': 58 - new JX.Notification() 59 - .setContent('(Aphlict) ' + message) 60 - .alterClassName('jx-notification-error', true) 61 - .setDuration(0) 62 - .show(); 63 - break; 64 - 65 58 case 'receive': 66 59 JX.Stratcom.invoke('aphlict-receive-message', null, message); 67 60 break; 68 61 69 62 default: 70 - if (__DEV__ && config.debug) { 63 + case 'error': 64 + if (config.debug) { 71 65 var details = message ? JX.JSON.stringify(message) : ''; 72 - 73 - new JX.Notification() 74 - .setContent('(Aphlict) [' + type + '] ' + details) 75 - .alterClassName('jx-notification-debug', true) 76 - .setDuration(3000) 77 - .show(); 66 + JX.log('(Aphlict) [' + type + '] ' + details); 78 67 } 68 + break; 79 69 } 80 70 } 81 71
webroot/rsrc/swf/aphlict.swf

This is a binary file and will not be displayed.