beautify all error msgs
This commit is contained in:
parent
0a0293d8fb
commit
d639eb1049
|
@ -208,9 +208,10 @@ module.exports = React.createClass({
|
||||||
}, function(err) {
|
}, function(err) {
|
||||||
modal.close();
|
modal.close();
|
||||||
this.refreshRoomList();
|
this.refreshRoomList();
|
||||||
|
console.error("Failed to " + step + ": " + err);
|
||||||
Modal.createDialog(ErrorDialog, {
|
Modal.createDialog(ErrorDialog, {
|
||||||
title: "Failed to "+step,
|
title: "Error",
|
||||||
description: err.toString()
|
description: "Failed to " + step,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -505,9 +505,10 @@ var RoomSubList = React.createClass({
|
||||||
// Do any final stuff here
|
// Do any final stuff here
|
||||||
}).fail(function(err) {
|
}).fail(function(err) {
|
||||||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
|
console.error("Failed to add tag " + self.props.tagName + " to room" + err);
|
||||||
Modal.createDialog(ErrorDialog, {
|
Modal.createDialog(ErrorDialog, {
|
||||||
title: "Failed to add tag " + self.props.tagName + " to room",
|
title: "Error",
|
||||||
description: err.toString()
|
description: "Failed to add tag " + self.props.tagName + " to room",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -58,9 +58,10 @@ module.exports = React.createClass({
|
||||||
};
|
};
|
||||||
}).fail(function(err) {
|
}).fail(function(err) {
|
||||||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
|
console.error("Failed to remove tag " + tagNameOff + " from room: " + err);
|
||||||
Modal.createDialog(ErrorDialog, {
|
Modal.createDialog(ErrorDialog, {
|
||||||
title: "Failed to remove tag " + tagNameOff + " from room",
|
title: "Error",
|
||||||
description: err.toString()
|
description: "Failed to remove tag " + tagNameOff + " from room",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -75,9 +76,10 @@ module.exports = React.createClass({
|
||||||
};
|
};
|
||||||
}).fail(function(err) {
|
}).fail(function(err) {
|
||||||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
|
console.error("Failed to add tag " + tagNameOn + " to room: " + err);
|
||||||
Modal.createDialog(ErrorDialog, {
|
Modal.createDialog(ErrorDialog, {
|
||||||
title: "Failed to add tag " + tagNameOn + " to room",
|
title: "Error",
|
||||||
description: err.toString()
|
description: "Failed to add tag " + tagNameOn + " to room",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -148,9 +150,10 @@ module.exports = React.createClass({
|
||||||
};
|
};
|
||||||
}, (err) => {
|
}, (err) => {
|
||||||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
|
console.error("Failed to set DM status of room: " + err);
|
||||||
Modal.createDialog(ErrorDialog, {
|
Modal.createDialog(ErrorDialog, {
|
||||||
title: "Failed to set Direct Message status of room",
|
title: "Error",
|
||||||
description: err.toString()
|
description: "Failed to set Direct Message status of room",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -84,9 +84,10 @@ var roomTileSource = {
|
||||||
//component.state.set({ spinner: component.state.spinner-- });
|
//component.state.set({ spinner: component.state.spinner-- });
|
||||||
}).fail(function(err) {
|
}).fail(function(err) {
|
||||||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
|
console.error("Failed to remove tag " + item.originalList.props.tagName + " from room: " + err);
|
||||||
Modal.createDialog(ErrorDialog, {
|
Modal.createDialog(ErrorDialog, {
|
||||||
title: "Failed to remove tag " + item.originalList.props.tagName + " from room",
|
title: "Error",
|
||||||
description: err.toString()
|
description: "Failed to remove tag " + item.originalList.props.tagName + " from room",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -103,9 +104,10 @@ var roomTileSource = {
|
||||||
//component.state.set({ spinner: component.state.spinner-- });
|
//component.state.set({ spinner: component.state.spinner-- });
|
||||||
}).fail(function(err) {
|
}).fail(function(err) {
|
||||||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
|
console.error("Failed to add tag " + item.targetList.props.tagName + " to room: " + err);
|
||||||
Modal.createDialog(ErrorDialog, {
|
Modal.createDialog(ErrorDialog, {
|
||||||
title: "Failed to add tag " + item.targetList.props.tagName + " to room",
|
title: "Error",
|
||||||
description: err.toString()
|
description: "Failed to add tag " + item.targetList.props.tagName + " to room",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -238,9 +238,10 @@ module.exports = React.createClass({
|
||||||
self._refreshFromServer();
|
self._refreshFromServer();
|
||||||
}, function(error) {
|
}, function(error) {
|
||||||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
|
console.error("Failed to change settings: " + error);
|
||||||
Modal.createDialog(ErrorDialog, {
|
Modal.createDialog(ErrorDialog, {
|
||||||
title: "Can't change settings",
|
title: "Error",
|
||||||
description: error.toString(),
|
description: "Failed to change settings",
|
||||||
onFinished: self._refreshFromServer
|
onFinished: self._refreshFromServer
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -307,9 +308,10 @@ module.exports = React.createClass({
|
||||||
self._refreshFromServer();
|
self._refreshFromServer();
|
||||||
}, function(error) {
|
}, function(error) {
|
||||||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
|
console.error("Can't update user notification settings: " + error);
|
||||||
Modal.createDialog(ErrorDialog, {
|
Modal.createDialog(ErrorDialog, {
|
||||||
title: "Can't update user notification settings",
|
title: "Error",
|
||||||
description: error.toString(),
|
description: "Can't update user notification settings",
|
||||||
onFinished: self._refreshFromServer
|
onFinished: self._refreshFromServer
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -348,9 +350,10 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
var onError = function(error) {
|
var onError = function(error) {
|
||||||
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||||
|
console.error("Failed to update keywords: " + error);
|
||||||
Modal.createDialog(ErrorDialog, {
|
Modal.createDialog(ErrorDialog, {
|
||||||
title: "Can't update keywords",
|
title: "Error",
|
||||||
description: error.toString(),
|
description: "Failed to update keywords",
|
||||||
onFinished: self._refreshFromServer
|
onFinished: self._refreshFromServer
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue