[Zorba-coders] [Bug 1009366] [NEW] access denied error message for module URIs does not contain location information

2012-06-06 Thread Till Westmann
Public bug reported:

If a user defined URIMapper denies access to a URI, then the error
message does not contain any location information.

** Affects: zorba
 Importance: Medium
 Assignee: Till Westmann (tillw)
 Status: New

** Changed in: zorba
   Importance: Undecided = High

** Changed in: zorba
   Importance: High = Medium

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1009366

Title:
  access denied error message for module URIs does not contain location
  information

Status in Zorba - The XQuery Processor:
  New

Bug description:
  If a user defined URIMapper denies access to a URI, then the error
  message does not contain any location information.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1009366/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-1009366 into lp:zorba

2012-06-06 Thread Till Westmann
Till Westmann has proposed merging lp:~zorba-coders/zorba/bug-1009366 into 
lp:zorba.

Requested reviews:
  Chris Hillery (ceejatec)
  Markos Zaharioudakis (markos-za)
Related bugs:
  Bug #1009366 in Zorba: access denied error message for module URIs does not 
contain location information
  https://bugs.launchpad.net/zorba/+bug/1009366

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1009366/+merge/108894

add location information to ZXQP0029_URI_ACCESS_DENIED
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1009366/+merge/108894
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/compiler/translator/translator.cpp'
--- src/compiler/translator/translator.cpp	2012-05-09 23:06:41 +
+++ src/compiler/translator/translator.cpp	2012-06-06 08:01:24 +
@@ -2955,13 +2955,24 @@
   // rather than using compURI directly, because we want the version
   // fragment to be passed to the mappers.
   zstring lErrorMessage;
-  std::auto_ptrinternal::Resource lResource =
-  theSctx-resolve_uri(compModVer.versioned_uri(),
-   internal::EntityData::MODULE,
-   lErrorMessage);
-
-  internal::StreamResource* lStreamResource =
-  dynamic_castinternal::StreamResource* (lResource.get());
+  std::auto_ptrinternal::Resource lResource;
+  internal::StreamResource* lStreamResource = NULL;
+
+  try
+  {
+lResource =
+theSctx-resolve_uri(compModVer.versioned_uri(),
+ internal::EntityData::MODULE,
+ lErrorMessage);
+
+lStreamResource =
+dynamic_castinternal::StreamResource* (lResource.get());
+  }
+  catch (XQueryException e)
+  {
+set_source(e, loc);
+throw;
+  }
 
   if (lStreamResource != NULL)
   {

=== modified file 'test/api/userdefined_uri_resolution.cpp'
--- test/api/userdefined_uri_resolution.cpp	2012-05-05 02:39:12 +
+++ test/api/userdefined_uri_resolution.cpp	2012-06-06 08:01:24 +
@@ -21,6 +21,7 @@
 #include zorba/zorba.h
 #include zorba/store_manager.h
 #include zorba/zorba_exception.h
+#include zorba/xquery_exception.h
 #include zorba/uri_resolvers.h
 #include zorba/diagnostic_list.h
 
@@ -297,12 +298,15 @@
 'http://expath.org/ns/file'; 
 1 + 1, lContext);
 std::cout  lQuery  std::endl;
-  } catch (ZorbaException e) {
+  } catch (XQueryException e) {
 std::cout  Caught exception:   e.what()  std::endl;
-if (e.diagnostic() == zerr::ZXQP0029_URI_ACCESS_DENIED) {
-  std::cout  ...the correct exception!  std::endl;
+if (e.diagnostic() == zerr::ZXQP0029_URI_ACCESS_DENIED
+ e.has_source()
+ e.source_line() == 1) {
   return true;
 }
+  } catch (ZorbaException e) {
+std::cout  Caught unexpected exception:   e.what()  std::endl;
   }
   return false;
 }

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Bug 1009366] Re: access denied error message for module URIs does not contain location information

2012-06-06 Thread Till Westmann
** Branch linked: lp:~zorba-coders/zorba/bug-1009366

-- 
You received this bug notification because you are a member of Zorba
Coders, which is the registrant for Zorba.
https://bugs.launchpad.net/bugs/1009366

Title:
  access denied error message for module URIs does not contain location
  information

Status in Zorba - The XQuery Processor:
  New

Bug description:
  If a user defined URIMapper denies access to a URI, then the error
  message does not contain any location information.

To manage notifications about this bug go to:
https://bugs.launchpad.net/zorba/+bug/1009366/+subscriptions

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/email-module-dayofweek-fix into lp:zorba/email-module

2012-06-06 Thread Sorin Marian Nasoi
Review: Approve

The changes seem OK to me.
-- 
https://code.launchpad.net/~zorba-coders/zorba/email-module-dayofweek-fix/+merge/108335
Your team Zorba Coders is subscribed to branch lp:zorba/email-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/email-module-dayofweek-fix into lp:zorba/email-module

2012-06-06 Thread Sorin Marian Nasoi
The proposal to merge lp:~zorba-coders/zorba/email-module-dayofweek-fix into 
lp:zorba/email-module has been updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/email-module-dayofweek-fix/+merge/108335
-- 
https://code.launchpad.net/~zorba-coders/zorba/email-module-dayofweek-fix/+merge/108335
Your team Zorba Coders is subscribed to branch lp:zorba/email-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/fix_spec_tests into lp:zorba

2012-06-06 Thread Sorin Marian Nasoi
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/fix_spec_tests/+merge/108960
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/email-module-dayofweek-fix into lp:zorba/email-module

2012-06-06 Thread Chris Hillery
David - you also need to set the commit message for this merge proposal in 
order for it to go through the validation queue.
-- 
https://code.launchpad.net/~zorba-coders/zorba/email-module-dayofweek-fix/+merge/108335
Your team Zorba Coders is subscribed to branch lp:zorba/email-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/xqj_installers into lp:zorba

2012-06-06 Thread Matthias Brantner
Review: Needs Fixing

make  make install on a clean build directory gives the following error:

CMake Error at swig/java/cmake_install.cmake:38 (FILE):
  file INSTALL cannot find
  /home/mbrantner/zorba/build/swig/java/libzorba_api.so.
Call Stack (most recent call first):
  swig/cmake_install.cmake:39 (INCLUDE)
  cmake_install.cmake:46 (INCLUDE)
-- 
https://code.launchpad.net/~zorba-coders/zorba/xqj_installers/+merge/108257
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp