|
1163 | 1163 | $scope.vm.error = void(0); |
1164 | 1164 |
|
1165 | 1165 | if(RAML.LoaderUtils.ramlOriginValidate(url, $scope.options)) { |
1166 | | - $scope.vm.error = {buffer : 'RAML origin check failed. Raml does not reside underneath the path:' + RAML.LoaderUtils.allowedRamlOrigin($scope.options)}; |
| 1166 | + $scope.vm.error = {message : 'RAML origin check failed. Raml does not reside underneath the path:' + RAML.LoaderUtils.allowedRamlOrigin($scope.options)}; |
1167 | 1167 | } else { |
1168 | 1168 | return ramlParser.loadPath($window.resolveUrl(url), null, $scope.options) |
1169 | 1169 | .then(function (raml) { |
1170 | 1170 | $scope.vm.raml = raml; |
1171 | 1171 | }) |
1172 | 1172 | .catch(function (error) { |
1173 | | - $scope.vm.error = angular.extend(error, { |
1174 | | - /*jshint camelcase: false */ |
1175 | | - buffer: (error.context_mark || error.problem_mark).buffer |
1176 | | - /*jshint camelcase: true */ |
1177 | | - }); |
| 1173 | + $scope.vm.error = error; |
1178 | 1174 | }) |
1179 | 1175 | .finally(function () { |
1180 | 1176 | $scope.vm.loaded = true; |
@@ -6979,17 +6975,12 @@ angular.module('ramlConsoleApp').run(['$templateCache', function($templateCache) |
6979 | 6975 | " </header>\n" + |
6980 | 6976 | "\n" + |
6981 | 6977 | " <div class=\"raml-console-initializer-row\">\n" + |
6982 | | - " <p class=\"raml-console-initializer-input-container\" style=\"height: 550px;\">\n" + |
6983 | | - " <textarea id=\"raml\" ui-codemirror=\"{\n" + |
6984 | | - " gutters: ['CodeMirror-lint-markers'],\n" + |
6985 | | - " lineNumbers: true,\n" + |
6986 | | - " lineWrapping: false,\n" + |
6987 | | - " lint: true,\n" + |
6988 | | - " mode: 'yaml',\n" + |
6989 | | - " tabSize: 2,\n" + |
6990 | | - " theme: 'raml-console'\n" + |
6991 | | - " }\" ng-model=\"vm.error.buffer\"></textarea>\n" + |
6992 | | - " </p>\n" + |
| 6978 | + " <div class=\"raml-console-parser-error\">\n" + |
| 6979 | + " <span>{{ vm.error.message }}</span>\n" + |
| 6980 | + " </div>\n" + |
| 6981 | + " <div class=\"raml-console-error-pre\" ng-repeat=\"err in vm.error.parserErrors\">\n" + |
| 6982 | + " {{err.message}}\n" + |
| 6983 | + " </div>\n" + |
6993 | 6984 | " </div>\n" + |
6994 | 6985 | " </section>\n" + |
6995 | 6986 | " </div>\n" + |
|
0 commit comments