(fix) a bit more error handling

pull/91/head
Ludovic Marcotte 2015-07-02 16:11:11 -04:00
parent 1a78882c51
commit 5ef2db59f7
1 changed files with 7 additions and 1 deletions

View File

@ -15,7 +15,13 @@
Dialog.prompt(l('New folder'),
l('Enter the new name of your folder :'))
.then(function(name) {
parentFolder.$newMailbox(parentFolder.id, name);
parentFolder.$newMailbox(parentFolder.id, name)
.then(function() {
// success
}, function(data, status) {
Dialog.alert(l('An error occured while creating the mailbox "%{0}".', name),
l(data.error));
});
});
};
$scope.editFolder = function(folder) {