REFACTOR: exception controller (#7675)

REFACTOR: exception controller (#7675)

diff --git a/app/assets/javascripts/discourse/controllers/exception.js.es6 b/app/assets/javascripts/discourse/controllers/exception.js.es6
index 6a45998..1f4c454 100644
--- a/app/assets/javascripts/discourse/controllers/exception.js.es6
+++ b/app/assets/javascripts/discourse/controllers/exception.js.es6
@@ -1,6 +1,9 @@
-import computed from "ember-addons/ember-computed-decorators";
+import {
+  on,
+  default as computed
+} from "ember-addons/ember-computed-decorators";
 
-var ButtonBackBright = {
+const ButtonBackBright = {
     classes: "btn-primary",
     action: "back",
     key: "errors.buttons.back"
@@ -28,11 +31,13 @@ export default Ember.Controller.extend({
   lastTransition: null,
 
   @computed
-  isNetwork: function() {
+  isNetwork() {
     // never made it on the wire
     if (this.get("thrown.readyState") === 0) return true;
+
     // timed out
     if (this.get("thrown.jqTextStatus") === "timeout") return true;
+
     return false;
   },
 
@@ -47,9 +52,10 @@ export default Ember.Controller.extend({
   networkFixed: false,
   loading: false,
 
-  _init: function() {
+  @on("init")
+  _init() {
     this.set("loading", false);
-  }.on("init"),
+  },
 
   @computed("isNetwork", "isServer", "isUnknown")
   reason() {
@@ -99,16 +105,16 @@ export default Ember.Controller.extend({
   },
 
   actions: {
-    back: function() {
+    back() {
       window.history.back();
     },
 
-    tryLoading: function() {
+    tryLoading() {
       this.set("loading", true);
-      var self = this;
-      Ember.run.schedule("afterRender", function() {
-        self.get("lastTransition").retry();
-        self.set("loading", false);
+
+      Ember.run.schedule("afterRender", () => {
+        this.lastTransition.retry();
+        this.set("loading", false);
       });
     }
   }

GitHub sha: 0c5498c9