Created
April 11, 2019 13:59
-
-
Save vodamiro/47a0d99b7be40fda930682bb9c71c7ad to your computer and use it in GitHub Desktop.
S_A_DefaultValues.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun logException(e: Throwable, level = Log.ERROR) { | |
// implementation | |
} | |
// Then you can call the method without providing the second parameter | |
logException(IllegalStateException("Test exception")) | |
logException(IllegalStateException("Test exception"), Log.WARN) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment