Move throwHumanError to api.js
It is only used there.
This commit is contained in:
parent
36b1e87214
commit
89c24cd2fa
4 changed files with 27 additions and 24 deletions
|
@ -38761,13 +38761,6 @@ window.textsecure.utils = function() {
|
|||
return self;
|
||||
}();
|
||||
|
||||
window.textsecure.throwHumanError = function(error, type, humanError) {
|
||||
var e = new Error(error);
|
||||
if (type !== undefined)
|
||||
e.name = type;
|
||||
e.humanError = humanError;
|
||||
throw e;
|
||||
}
|
||||
|
||||
var handleAttachment = function(attachment) {
|
||||
function getAttachment() {
|
||||
|
@ -39122,7 +39115,15 @@ window.textsecure.api = function () {
|
|||
options.error(null, xhr.status);
|
||||
};
|
||||
xhr.send( options.data || null );
|
||||
};
|
||||
}
|
||||
|
||||
function throwHumanError (error, type, humanError) {
|
||||
var e = new Error(error);
|
||||
if (type !== undefined)
|
||||
e.name = type;
|
||||
e.humanError = humanError;
|
||||
throw e;
|
||||
}
|
||||
|
||||
var doAjax = function (param) {
|
||||
if (param.urlParameters === undefined) {
|
||||
|
|
|
@ -38760,13 +38760,6 @@ window.textsecure.utils = function() {
|
|||
return self;
|
||||
}();
|
||||
|
||||
window.textsecure.throwHumanError = function(error, type, humanError) {
|
||||
var e = new Error(error);
|
||||
if (type !== undefined)
|
||||
e.name = type;
|
||||
e.humanError = humanError;
|
||||
throw e;
|
||||
}
|
||||
|
||||
var handleAttachment = function(attachment) {
|
||||
function getAttachment() {
|
||||
|
@ -39121,7 +39114,15 @@ window.textsecure.api = function () {
|
|||
options.error(null, xhr.status);
|
||||
};
|
||||
xhr.send( options.data || null );
|
||||
};
|
||||
}
|
||||
|
||||
function throwHumanError (error, type, humanError) {
|
||||
var e = new Error(error);
|
||||
if (type !== undefined)
|
||||
e.name = type;
|
||||
e.humanError = humanError;
|
||||
throw e;
|
||||
}
|
||||
|
||||
var doAjax = function (param) {
|
||||
if (param.urlParameters === undefined) {
|
||||
|
|
|
@ -87,7 +87,15 @@ window.textsecure.api = function () {
|
|||
options.error(null, xhr.status);
|
||||
};
|
||||
xhr.send( options.data || null );
|
||||
};
|
||||
}
|
||||
|
||||
function throwHumanError (error, type, humanError) {
|
||||
var e = new Error(error);
|
||||
if (type !== undefined)
|
||||
e.name = type;
|
||||
e.humanError = humanError;
|
||||
throw e;
|
||||
}
|
||||
|
||||
var doAjax = function (param) {
|
||||
if (param.urlParameters === undefined) {
|
||||
|
|
|
@ -123,13 +123,6 @@ window.textsecure.utils = function() {
|
|||
return self;
|
||||
}();
|
||||
|
||||
window.textsecure.throwHumanError = function(error, type, humanError) {
|
||||
var e = new Error(error);
|
||||
if (type !== undefined)
|
||||
e.name = type;
|
||||
e.humanError = humanError;
|
||||
throw e;
|
||||
}
|
||||
|
||||
var handleAttachment = function(attachment) {
|
||||
function getAttachment() {
|
||||
|
|
Loading…
Reference in a new issue