YuNing's Thought

Home

❯

Notes

❯

Kotlin Exceptions

Kotlin Exceptions

Properties
1
aliases
—

Apr 24, 20251 min read

Precondition functionUse caseException thrown
require()Checks user input validityIllegalArgumentException
check()Checks object or variable state validityIllegalStateException
error()Indicates an illegal state or conditionIllegalStateException

Custom Exception

class MyException: Exception("My message")

Links

  • Exceptions | Kotlin Documentation
  • Kotlin Type

Graph View

  • Custom Exception
  • Links

Backlinks

  • Kotlin Type
  • Kotlin

Created with Quartz v5.5.0 © 2026

  • GitHub
  • Discord Community