Page MenuHomePhabricator

D9698.diff
No OneTemporary

D9698.diff

diff --git a/support/aphlict/client/src/Aphlict.as b/support/aphlict/client/src/Aphlict.as
--- a/support/aphlict/client/src/Aphlict.as
+++ b/support/aphlict/client/src/Aphlict.as
@@ -34,7 +34,7 @@
ExternalInterface.call('JX.Aphlict.didReceiveEvent', type, object);
}
- final protected function error(error:Error):void {
+ final protected function error(error:Object):void {
this.externalInvoke('error', error.toString());
}
diff --git a/support/aphlict/client/src/AphlictClient.as b/support/aphlict/client/src/AphlictClient.as
--- a/support/aphlict/client/src/AphlictClient.as
+++ b/support/aphlict/client/src/AphlictClient.as
@@ -4,7 +4,7 @@
import flash.external.ExternalInterface;
import flash.utils.Dictionary;
import flash.utils.Timer;
-
+ import flash.events.UncaughtErrorEvent;
final public class AphlictClient extends Aphlict {
@@ -37,6 +37,10 @@
public function AphlictClient() {
super();
+ loaderInfo.uncaughtErrorEvents.addEventListener(
+ UncaughtErrorEvent.UNCAUGHT_ERROR,
+ this.uncaughtErrorHandler);
+
ExternalInterface.addCallback('connect', this.externalConnect);
ExternalInterface.call(
'JX.Stratcom.invoke',
@@ -45,6 +49,10 @@
{});
}
+ private function uncaughtErrorHandler(event:UncaughtErrorEvent):void {
+ this.error(event.error.toString());
+ }
+
public function externalConnect(
server:String,
port:Number,
diff --git a/webroot/rsrc/js/application/aphlict/behavior-aphlict-listen.js b/webroot/rsrc/js/application/aphlict/behavior-aphlict-listen.js
--- a/webroot/rsrc/js/application/aphlict/behavior-aphlict-listen.js
+++ b/webroot/rsrc/js/application/aphlict/behavior-aphlict-listen.js
@@ -8,6 +8,7 @@
* javelin-dom
* javelin-json
* javelin-router
+ * javelin-util
* phabricator-notification
*/
@@ -54,28 +55,17 @@
// a request to Phabricator to get notification details.
function onaphlictmessage(type, message) {
switch (type) {
- case 'error':
- new JX.Notification()
- .setContent('(Aphlict) ' + message)
- .alterClassName('jx-notification-error', true)
- .setDuration(0)
- .show();
- break;
-
case 'receive':
JX.Stratcom.invoke('aphlict-receive-message', null, message);
break;
default:
- if (__DEV__ && config.debug) {
+ case 'error':
+ if (config.debug) {
var details = message ? JX.JSON.stringify(message) : '';
-
- new JX.Notification()
- .setContent('(Aphlict) [' + type + '] ' + details)
- .alterClassName('jx-notification-debug', true)
- .setDuration(3000)
- .show();
+ JX.log('(Aphlict) [' + type + '] ' + details);
}
+ break;
}
}
diff --git a/webroot/rsrc/swf/aphlict.swf b/webroot/rsrc/swf/aphlict.swf
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001
literal 0
Hc$@<O00001

File Metadata

Mime Type
text/plain
Expires
Fri, Sep 20, 9:40 PM (20 h, 42 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6624256
Default Alt Text
D9698.diff (3 KB)

Event Timeline