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