Skip to content

Commit

Permalink
Merge pull request #1327 from StochSS/develop
Browse files Browse the repository at this point in the history
Release v2.4.8
  • Loading branch information
briandrawert authored Aug 16, 2022
2 parents d5ccccc + ff9404d commit 4947d9a
Show file tree
Hide file tree
Showing 97 changed files with 5,615 additions and 3,166 deletions.
2 changes: 1 addition & 1 deletion __version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# @website https://github.com/stochss/stochss
# =============================================================================

__version__ = '2.4.7'
__version__ = '2.4.8'
__title__ = 'StochSS'
__description__ = 'StochSS is an integrated development environment (IDE) \
for simulation of biochemical networks.'
Expand Down
54 changes: 34 additions & 20 deletions client/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,31 +100,45 @@ let registerRenderSubview = (parent, view, hook) => {
let getXHR = (endpoint, {
always = function (err, response, body) {}, success = function (err, response, body) {},
error = function (err, response, body) {}}={}) => {
xhr({uri: endpoint, json: true}, function (err, response, body) {
if(response.statusCode < 400) {
success(err, response, body);
}else if(response.statusCode < 500) {
error(err, response, body);
}else{
console.log("Critical Error Detected");
}
always(err, response, body);
});
try {
xhr({uri: endpoint, json: true}, function (err, response, body) {
if(response.statusCode < 400) {
success(err, response, body);
}else if(response.statusCode < 500) {
error(err, response, body);
}else{
console.log("Critical Error Detected");
}
always(err, response, body);
});
}catch(exception){
console.log(exception);
let response = {Reason: "Network Error", Message: exception};
let body = {response: response, err: exception}
error(exception, response, body);
}
};

let postXHR = (endpoint, data, {
always = function (err, response, body) {}, success = function (err, response, body) {},
error = function (err, response, body) {}}={}, isJSON) => {
xhr({uri: endpoint, json: isJSON !== undefined ? isJSON : true, method: "post", body: data}, function (err, response, body) {
if(response.statusCode < 400) {
success(err, response, body);
}else if(response.statusCode < 500) {
error(err, response, body);
}else{
console.log("Critical Error Detected");
}
always(err, response, body);
});
try {
xhr({uri: endpoint, json: isJSON !== undefined ? isJSON : true, method: "post", body: data}, function (err, response, body) {
if(response.statusCode < 400) {
success(err, response, body);
}else if(response.statusCode < 500) {
error(err, response, body);
}else{
console.log("Critical Error Detected");
}
always(err, response, body);
});
}catch(exception){
console.log(exception);
let response = {Reason: "Network Error", Message: exception};
let body = {response: response, err: exception}
error(exception, response, body);
}
};

let getBrowser = () => {
Expand Down
Loading

0 comments on commit 4947d9a

Please sign in to comment.