From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.glorb.com!feeder.erje.net!feeder2.news.saunalahti.fi!fi.sn.net!newsfeed2.tdcnet.fi!news.song.fi!not-for-mail Date: Wed, 24 Jun 2009 12:59:49 +0300 From: Niklas Holsti User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20060628 Debian/1.7.8-1sarge7.1 X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Not visible References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <4a41f8dd$0$6263$4f793bc4@news.tdc.fi> Organization: TDC Internet Services NNTP-Posting-Host: 81.17.205.61 X-Trace: 1245837533 news.tdc.fi 6263 81.17.205.61:33170 X-Complaints-To: abuse@tdcnet.fi Xref: g2news2.google.com comp.lang.ada:6592 Date: 2009-06-24T12:59:49+03:00 List-Id: Pietro Tornaindietro wrote: > hi, i'm a newbie. > > i'm using APQ. Yes... and no, see below :-) > > procedure aa33 is > use APQ.PostgreSQL, APQ.PostgreSQL.Client; ... > exception > when Not_Connected => > > > and when i compile this code, gnat tells me " "Not_Connected" is not > visible". > > what's the problem? The exception Not_Connected seems to be declared in the package APQ, which you do not "use". So either add "use APQ" to the use-clauses, or qualify the exception name: exception when APQ.Not_Connected => There is a difference here in the Ada language between the "with" clause and the "use" clause: when you "with" a child package, as in with APQ.PostgreSQL; you implicitly "with" the parent, APQ. But when you "use" a child package, as in your use APQ.PostgreSQL, ... the parent package APQ is not implicitly "used", so its entities are not visible without qualification by "APQ.xxx". HTH, -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .