@@ -35,7+38,7 @@ public class SCLValueAccessor implements ValueAccessor {
try {
return getValue1.apply(context);
} catch (Throwable t) {
try {
return getValue1.apply(context);
} catch (Throwable t) {
- throw new DatabaseException(t);
+ throw new MissingVariableValueException("Could not get value for " + String.valueOf(context.getRepresents(graph)), t);
} finally {
sclContext.put("graph", oldGraph);
}
} finally {
sclContext.put("graph", oldGraph);
}
@@ -48,7+51,7 @@ public class SCLValueAccessor implements ValueAccessor {
try {
return getValue2.apply(context, binding);
} catch (Throwable t) {
try {
return getValue2.apply(context, binding);
} catch (Throwable t) {
- throw new DatabaseException(t);
+ throw new MissingVariableValueException("Could not get value for " + String.valueOf(context.getRepresents(graph)) + " with binding " + binding, t);
} finally {
sclContext.put("graph", oldGraph);
}
} finally {
sclContext.put("graph", oldGraph);
}
@@ -61,7+64,7 @@ public class SCLValueAccessor implements ValueAccessor {
try {
setValue2.apply(context, value);
} catch (Throwable t) {
try {
setValue2.apply(context, value);
} catch (Throwable t) {
- throw new DatabaseException(t);
+ throw new NonWritableVariableException("Could not write value " + String.valueOf(value) + " for " + String.valueOf(context.getRepresents(graph)), t);
} finally {
sclContext.put("graph", oldGraph);
}
} finally {
sclContext.put("graph", oldGraph);
}
@@ -74,7+77,7 @@ public class SCLValueAccessor implements ValueAccessor {
try {
setValue3.apply(context, value, binding);
} catch (Throwable t) {
try {
setValue3.apply(context, value, binding);
} catch (Throwable t) {
- throw new DatabaseException(t);
+ throw new NonWritableVariableException("Could not write value " + String.valueOf(value) + " for " + String.valueOf(context.getRepresents(graph)) + " with binding " + binding, t);
} finally {
sclContext.put("graph", oldGraph);
}
} finally {
sclContext.put("graph", oldGraph);
}
@@ -87,7+90,7 @@ public class SCLValueAccessor implements ValueAccessor {
try {
return getDatatype.apply(context);
} catch (Throwable t) {
try {
return getDatatype.apply(context);
} catch (Throwable t) {
- throw new DatabaseException(t);
+ throw new DatatypeNotFoundException("Could not find datatype for " + String.valueOf(context.getRepresents(graph)), t);