]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.document.server/src/org/simantics/document/server/Functions.java
Sync git svn branch with SVN repository r33144.
[simantics/platform.git] / bundles / org.simantics.document.server / src / org / simantics / document / server / Functions.java
index 3892b50151a94b036d3a0a3460119cc3d6beaf85..2fd422f5eb5447df01bbe491fd5349e5b861f0c8 100644 (file)
@@ -188,6 +188,8 @@ public class Functions {
     @SCLValue(type = "ReadGraph -> Resource -> Variable -> Variable")\r
     public static Variable state(ReadGraph graph, Resource converter, Variable context) throws DatabaseException {\r
        Variable session = graph.syncRequest(new ProxySessionRequest(context));\r
+       if (session == null)\r
+           throw new DatabaseException("No state for " + context.getURI(graph));\r
        return session.getPossibleChild(graph, "__scl__");\r
     }\r
 \r