Skip to content

Commit 8be7087

Browse files
committed
Throw exception when JsonToSDL has errors
1 parent 0591891 commit 8be7087

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

.run/Run.run.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="Run" type="GradleRunConfiguration" factoryName="Gradle">
3+
<log_file alias="log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" />
34
<ExternalSystemSettings>
45
<option name="executionName" />
56
<option name="externalProjectPath" value="$PROJECT_DIR$" />

src/main/com/intellij/lang/jsgraphql/schema/GraphQLRegistryProvider.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ public GraphQLRegistryInfo getRegistryInfo(@NotNull PsiElement scopedElement) {
124124
}
125125
} catch (ProcessCanceledException e) {
126126
throw e;
127+
} catch (SchemaProblem e) {
128+
errors.add(e);
127129
} catch (Exception e) {
128130
final List<SourceLocation> sourceLocation = Collections.singletonList(new SourceLocation(1, 1, GraphQLPsiUtil.getFileName(psiFile)));
129131
errors.add(new SchemaProblem(Collections.singletonList(new InvalidSyntaxError(sourceLocation, e.getMessage()))));

0 commit comments

Comments
 (0)