Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14317200
D9698.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D9698.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 7:53 AM (21 h, 16 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6906734
Default Alt Text
D9698.diff (3 KB)
Attached To
Mode
D9698: Install an uncaught exception handler in Aphlict
Attached
Detach File
Event Timeline
Log In to Comment