Skip to content

Instantly share code, notes, and snippets.

View kamilens's full-sized avatar
🐢
I may be slow to respond.

kamilens kamilens

🐢
I may be slow to respond.
View GitHub Profile
@kamilens
kamilens / error-handling.md
Created July 6, 2022 16:02 — forked from dreynaud/error-handling.md
Error Handling in Practice

Error Handling in Practice

My experience is mostly with Java backend services in the cloud, so the advice in this post will almost certainly be biased towards this kind of error handling. But hopefully, some of it will be generally applicable and help you maintain and debug your programs in the long run.

I don't claim that these are universal best practices, but I have found these to be useful as general guidelines. As always, use your best judgment and do things that make sense in your context.

Log the whole thing

In Java, a full exception is:

@kamilens
kamilens / regex.txt
Created July 21, 2021 21:16 — forked from sanan-fataliyev/regex.txt
Azərbaycan mobil nömrə prefixlərinə uyğun regex
(?:0|994)(?:12|51|50|55|70|77)[^\w]{0,2}[2-9][0-9]{2}[^\w]{0,2}[0-9]{2}[^\w]{0,2}[0-9]{2}[^\d]