comp.lang.ada
 help / color / mirror / Atom feed
From: Shark8 <onewingedshark@gmail.com>
Subject: Re: "accessibility check failed" on Node
Date: Wed, 26 Jun 2013 16:45:02 -0700 (PDT)
Date: 2013-06-26T16:45:02-07:00	[thread overview]
Message-ID: <ab1bb922-96ca-45f6-8cf3-9d029ca8f5a3@googlegroups.com> (raw)
In-Reply-To: <kqfrrv$lsb$1@news2.open-news-network.org>

At first blush, it looks like aNode is Null.
(position : constant NodeSets.Cursor := graph.nodes.Find (aNode.all'Access);)

Try adding "not null" to the parameter... or you could restructure it a bit:
    function findNode2
      (graph : DirectedGraph;
       aNode : access Node'Class)
      return  Node_Class_Access is

    begin
	declare
	    position : constant NodeSets.Cursor :=
	      graph.nodes.Find (aNode.all'Access);
	begin
	    if position /= NodeSets.No_Element then
		return Element (position);
	    else
		raise NoElement;
	    end if;
	exception
	    When PROGRAM_ERROR => raise NoElement;
	end;
    end findNode2;


  reply	other threads:[~2013-06-26 23:45 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-26 23:01 "accessibility check failed" on Node Thomas Schmidt
2013-06-26 23:45 ` Shark8 [this message]
2013-06-26 23:58 ` Jeffrey Carter
2013-06-27  7:36 ` Georg Bauhaus
2013-06-27  7:49 ` Dmitry A. Kazakov
2013-06-27  8:24 ` Simon Wright
2013-06-27 11:19   ` Thomas Schmidt
2013-06-27 12:49     ` Frédéric Praca
2013-06-27 14:36     ` Eryndlia Mavourneen
2013-06-27 17:31       ` Jeffrey Carter
2013-06-27 17:45         ` Simon Wright
2013-06-27 23:26           ` Randy Brukardt
2013-06-28  0:52             ` Jeffrey Carter
2013-06-27 18:33         ` Eryndlia Mavourneen
2013-06-27 20:31           ` Jeffrey Carter
2013-06-27 23:29             ` Randy Brukardt
2013-06-27 14:51     ` Shark8
2013-06-27 17:29     ` Jeffrey Carter
2013-06-27 10:46 ` Stephen Leake
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox