Improving some error marker messages
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding/<project>=UTF-8
|
||||
@@ -0,0 +1,4 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding//src/test/java=UTF-8
|
||||
encoding/<project>=UTF-8
|
||||
@@ -0,0 +1,3 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding/<project>=UTF-8
|
||||
@@ -10,13 +10,15 @@
|
||||
*******************************************************************************/
|
||||
package org.springframework.ide.vscode.commons.languageserver.reconcile;
|
||||
|
||||
import org.springframework.ide.vscode.commons.util.ValueParseException;
|
||||
|
||||
/**
|
||||
* Exception if there is a failure when parsing a value. It does not wrap
|
||||
* other exceptions such that when thrown, the parse exception is the "deepest"
|
||||
* error.
|
||||
*
|
||||
*/
|
||||
public class ReconcileException extends Exception implements ProblemTypeProvider {
|
||||
public class ReconcileException extends ValueParseException implements ProblemTypeProvider {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private final ProblemType problemType;
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding//src/test/java=UTF-8
|
||||
encoding/<project>=UTF-8
|
||||
@@ -0,0 +1,4 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding//src/test/java=UTF-8
|
||||
encoding/<project>=UTF-8
|
||||
@@ -32,6 +32,7 @@ import org.springframework.ide.vscode.commons.util.ExceptionUtil;
|
||||
import org.springframework.ide.vscode.commons.util.IntegerRange;
|
||||
import org.springframework.ide.vscode.commons.util.Log;
|
||||
import org.springframework.ide.vscode.commons.util.StringUtil;
|
||||
import org.springframework.ide.vscode.commons.util.ValueParseException;
|
||||
import org.springframework.ide.vscode.commons.util.ValueParser;
|
||||
import org.springframework.ide.vscode.commons.util.text.IDocument;
|
||||
import org.springframework.ide.vscode.commons.yaml.ast.NodeUtil;
|
||||
@@ -194,7 +195,7 @@ public class SchemaBasedYamlASTReconciler implements YamlASTReconciler {
|
||||
Throwable e = ExceptionUtil.getDeepestCause(_e);
|
||||
|
||||
// If value parse exception, do not append any additional information
|
||||
if (e instanceof ReconcileException) {
|
||||
if (e instanceof ValueParseException) {
|
||||
String msg = e.getMessage();
|
||||
if (StringUtil.hasText(msg)) {
|
||||
return msg;
|
||||
|
||||
Reference in New Issue
Block a user