Better exception message if Ignite is not started
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/dafad526 Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/dafad526 Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/dafad526 Branch: refs/heads/ignite-1.5-cache-get-opts Commit: dafad526f84ecbf503135c7538ffef07dd5e1c4f Parents: 4d29cb7 Author: Valentin Kulichenko <[email protected]> Authored: Tue Nov 24 16:34:37 2015 -0800 Committer: Valentin Kulichenko <[email protected]> Committed: Tue Nov 24 16:34:37 2015 -0800 ---------------------------------------------------------------------- .../main/java/org/apache/ignite/internal/IgnitionEx.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ignite/blob/dafad526/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java ---------------------------------------------------------------------- diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java index 7d2b2dc..6bd74be 100644 --- a/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java +++ b/modules/core/src/main/java/org/apache/ignite/internal/IgnitionEx.java @@ -1187,8 +1187,8 @@ public class IgnitionEx { Ignite res; if (grid == null || (res = grid.grid()) == null) - throw new IgniteIllegalStateException("Grid instance was not properly started " + - "or was already stopped: " + name); + throw new IgniteIllegalStateException("Ignite instance with provided name doesn't exist. " + + "Did you call Ignition.start(..) to start an Ignite instance? [name=" + name + ']'); return res; } @@ -1205,7 +1205,8 @@ public class IgnitionEx { IgniteKernal res; if (grid == null || (res = grid.gridx()) == null) - throw new IllegalStateException("Grid instance was not properly started or was already stopped: " + name); + throw new IgniteIllegalStateException("Ignite instance with provided name doesn't exist. " + + "Did you call Ignition.start(..) to start an Ignite instance? [name=" + name + ']'); return res; } @@ -2388,4 +2389,4 @@ public class IgnitionEx { } } } -} \ No newline at end of file +}
