Catching errors on DB name

Wednesday, 12 March 2014 · 2 messages
FB
France Baril12 Mar 2014 02:25 #
I was getting an error (improper use or bug) on : for $file in db:open('Translation-management', '/xliff-history/fr-ca')[not(ends-with(base-uri(), 'accessibility.xml')) and not(ends-with(base-uri(), 'account-add.xml')) and not(ends-with(base-uri(), 'account-sync.xml'))] let $sub-uri := substring-after($file/base-uri(), 'Translation-management') return db:delete('Translation-management-simple', $sub-uri) where the DB name in the db:delete doesn't exist (my fault, I forgot to rename it). Stil,, it'd be nice to have a more specific error message for a case like this. Other similar function return DB does not exist, if I recall properly. Thanks, France
-- France Baril Architecte documentaire / Documentation architect france.baril at architextus.com (514) 572-0341
CG
Christian Grün12 Mar 2014 11:37 #
Hi France, could you please provide us with the full stack trace? I've just tried:
  db:delete('a','b')
It gives me the proper error message: [BXDB0002] Database 'a' was not found.
Quoted text · France Baril · 32 lines
On Wed, Mar 12, 2014 at 1:25 AM, France Baril <france.baril at architextus.com> wrote: > I was getting an error (improper use or bug) on : > > for $file in db:open('Translation-management', > '/xliff-history/fr-ca')[not(ends-with(base-uri(), 'accessibility.xml')) > and not(ends-with(base-uri(), 'account-add.xml')) > and not(ends-with(base-uri(), 'account-sync.xml'))] > let $sub-uri := substring-after($file/base-uri(), 'Translation-management') > return db:delete('Translation-management-simple', $sub-uri) > > where the DB name in the db:delete doesn't exist (my fault, I forgot to > rename it). > > Stil,, it'd be nice to have a more specific error message for a case like > this. Other similar function return DB does not exist, if I recall properly. > > Thanks, > > France > > -- > France Baril > Architecte documentaire / Documentation architect > france.baril at architextus.com > (514) 572-0341 > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >

⚡Generated with XQuery