This commit is contained in:
@@ -35,24 +35,26 @@ function dealWithError(msg, vm) {
|
||||
}
|
||||
|
||||
//If a form instance was provided (vue instance)
|
||||
//then put the error into it
|
||||
if (vm) {
|
||||
if (vm.$ay.dev) {
|
||||
//make sure formState.appError is defined on data
|
||||
if (!window.$gz._.has(vm, "formState.appError")) {
|
||||
throw "DEV ERROR errorHandler::dealWithError -> formState.appError seems to be missing from form's vue data object";
|
||||
}
|
||||
}
|
||||
vm.formState.appError = msg;
|
||||
|
||||
//TODO: What is this doing exactly?
|
||||
//it's related to server errors but I'm setting appError above
|
||||
//why two error properties?
|
||||
window.$gz.form.setErrorBoxErrors(vm);
|
||||
} else {
|
||||
//and it can display and error then put the error into it
|
||||
if (!vm || vm.formState == undefined) {
|
||||
//popup if no place to display it elsewise
|
||||
window.$gz.eventBus.$emit("notify-error", msg);
|
||||
return;
|
||||
}
|
||||
|
||||
//should be able to display in form...
|
||||
if (vm.$ay.dev) {
|
||||
//make sure formState.appError is defined on data
|
||||
if (!window.$gz._.has(vm, "formState.appError")) {
|
||||
throw "DEV ERROR errorHandler::dealWithError -> formState.appError seems to be missing from form's vue data object";
|
||||
}
|
||||
}
|
||||
vm.formState.appError = msg;
|
||||
|
||||
//TODO: What is this doing exactly?
|
||||
//it's related to server errors but I'm setting appError above
|
||||
//why two error properties?
|
||||
window.$gz.form.setErrorBoxErrors(vm);
|
||||
}
|
||||
export default {
|
||||
handleGeneralError(message, source, lineno, colno, error) {
|
||||
|
||||
Reference in New Issue
Block a user