Skip to content

can't catch error #164

@transtone

Description

@transtone

I use casbin.postgresql adapter

local ok, err = pcall(function()
    local a = Adapter:new(pg_conf, "auth_casbin_rule")
    local ef = Enforcer:new("/usr/local/openresty/nginx/conf/lua/casbin/rbac_model_dom.conf", a)
    ef:loadPolicy()
end)

when I use a wrong password in pg_conf, it will get a error in error.log file,
but I can't get the error with pcall like above, it always get ok.

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions