Harmonization with IVIS

This commit is contained in:
Tomas Bures 2019-01-04 21:31:01 +01:00
parent 428fb9db7b
commit 397f85dac4
41 changed files with 8587 additions and 10940 deletions

View file

@ -2,7 +2,6 @@
import React from "react";
import PropTypes from 'prop-types';
import {SectionContentContext} from "./page-common";
import {createComponentMixin} from "./decorator-helpers";
function handleError(that, error) {
@ -66,3 +65,12 @@ export function withAsyncErrorHandler(target, name, descriptor) {
return descriptor;
}
export function wrapWithAsyncErrorHandler(self, fn) {
return async function () {
try {
await fn.apply(this, arguments)
} catch (error) {
handleError(self, error);
}
};
}