Commit a19235a2 authored by Renato Figueiro Maia's avatar Renato Figueiro Maia
Browse files

[OPENBUS-2881] Correção para que operações legadas lancem exceções corretas

- Correção apenas nas seguintes operações que apresentaram o problema nos testes do 2.0 sobre um núcleo 2.1:
  - LoginRegistry::getAllLogins
  - LoginObserverSubscription::watchLogin
  - LoginObserverSubscription::forgetLogin
  - LoginObserverSubscription::watchLogins
  - LoginObserverSubscription::forgetLogins



git-svn-id: https://subversion.tecgraf.puc-rio.br/engdist/openbus/core/trunk@168976 ae0415b3-e90b-0410-900d-d0be9363c56b
parent 39f9dba9
......@@ -59,6 +59,9 @@ local ServiceOfferType = offtyp.ServiceOffer
local cvrtyp = oldidl.types.v2_1.services.legacy_support
local LegacyConverterType = cvrtyp.LegacyConverter
local coreutil = require "openbus.core.services.util"
local assertCaller = coreutil.assertCaller
local function traceback(errmsg)
if type(errmsg) == "string" then
return stacktrace(errmsg)
......@@ -226,9 +229,18 @@ end
-- IDL operations
function LoginRegistry:getAllLogins(...)
doexcept(xpcall(assertCaller, traceback, self))
return trymethod(self.__object, "getAllLogins", ...)
end
function LoginRegistry:subscribeObserver(...)
local subscription = trymethod(self.__object, "subscribeObserver", ...)
subscription.__type = LoginObsSubType
wrapmethod(subscription, "watchLogin")
wrapmethod(subscription, "forgetLogin")
wrapmethod(subscription, "watchLogins")
wrapmethod(subscription, "forgetLogins")
wrapmethod(subscription, "remove")
return subscription
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment