AndroidBites: That’s how we try-catch ?: Value
An elegant way of error handling using expressions and null-handing
Taking inspiration from getOrNull type function in Kotlin, I ended up creating this extension which has helped me out in multiple cases, Specially dealings with JsonParsing
.
Highly recommend the following extended explanation of how this extension work, Do checkout and stay tuned for more content.
Happy Hacking!
follow me on social media :
LinkedIn : https://bit.ly/ch8n-linkdIn
Medium: https://bit.ly/ch8n-medium
Twitter: https://bit.ly/ch8n-twitter
Blog: https://chetangupta.net
Github: https://bit.ly/ch8n-git
Youtube: https://bit.ly/ch8n-youtube