SHARE
TWEET

Untitled

a guest Aug 24th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. enum class LMDDomain(val domainKey: String){
  2.     APP("B"),
  3.     ACCOUNT("C")
  4. }
  5.  
  6. enum class LMDError(val error: Int){
  7.     ERROR1(10),
  8.     ERROR2(12)
  9. }
  10.  
  11. sealed class Failure(
  12.     val code: LMDError,
  13.     val domain: LMDDomain,
  14.     val analyticsTracking : Boolean = false,
  15.     val message: String? = null,
  16.     val exception: Exception ?= null,
  17.     val internalCode: Int ?= null
  18. ) {
  19.  
  20.     abstract class FeatureFailure(code: LMDError,
  21.                                   domain: LMDDomain,
  22.                                   analyticsTracking : Boolean = false,
  23.                                   message: String? = null,
  24.                                   exception: Exception ?= null,
  25.                                   internalCode: Int? = null): Failure(code, domain, analyticsTracking, message, exception, internalCode)
  26.  
  27.     object ParsingFailure : Failure(LMDError.ERROR1, LMDDomain.APP, false)
  28.     object Parsing2Failure : Failure(LMDError.ERROR1, LMDDomain.APP, false)
  29.  
  30. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top