mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-11 07:15:55 +08:00
init project
This commit is contained in:
14
app/libs/wechat_oauth/error.rb
Normal file
14
app/libs/wechat_oauth/error.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class WechatOauth::Error < StandardError
|
||||
attr_reader :code
|
||||
|
||||
def initialize(code, msg)
|
||||
super(msg)
|
||||
@code = code
|
||||
end
|
||||
|
||||
def message
|
||||
I18n.t("oauth.wechat.#{code}")
|
||||
rescue I18n::MissingTranslationData
|
||||
super
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user