# # ----------------------------------------------------------------------- # Copyright © 2012 ShepHertz Technologies Pvt Ltd. All rights reserved. # ----------------------------------------------------------------------- class App42Exception < Exception attr_accessor :http_error_code, :app_error_code, :detailMessage def initialize(*args) if args.size == 1 super(args[0]) self::initialize1(args[0]) elsif args.size == 2 super(args[0]) self::initialize2(args[0], args[1]) elsif args.size == 3 super(args[0]) self::initialize3(args[0], args[1], args[2]) end end def initialize1(detailMessage) @detailMessage = detailMessage end def initialize2(http_error_code,app_error_code) @http_error_code = http_error_code @pp_error_code = app_error_code end def initialize3(detailMessage, http_error_code, app_error_code) @http_error_code = http_error_code @app_error_code = app_error_code @detailMessage = detailMessage end end