Try Catch Block

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2022 Feb 17 16:17
Editor
Edited
Edited
2025 May 28 23:47
Refs
Refs
  • Readability is significantly reduced
  • Feels like using GOTO statements due to being disconnected from the main code flow
  • This can lead to duplicate exception handling and difficult maintenance

Go style is better

 
 
 
The most important function in my codebase
Error handling in TypeScript is bad. Try catch is NOT a good pattern. Go got a lot wrong, but returning errors as values was absolutely right. Thank you CodeRabbit for sponsoring! Check them out at: https://soydev.link/coderabbit SOURCES https://gist.github.com/t3dotgg/a486c4ae66d32bf17c09c73609dacc5b https://github.com/supermacro/neverthrow https://effect.website/ https://ethanniser.dev/blog/the-truth-about-effect/ Try T3 Chat? https://soydev.link/chat Want to sponsor a video? Learn more here: https://soydev.link/sponsor-me Check out my Twitch, Twitter, Discord more at https://t3.gg S/O Ph4se0n3 for the awesome edit 🙏
The most important function in my codebase
간단한 모나드 설명과 예제
자바스크립트 관련 코드는 해당 스터디쪽 문서에 올릴 예정. 역시 모나드를 이해할때는 Haskell이 가장 효율적이므로 Haskell로 된 코드를 사용해보자. 자바스크립트로도 설명할 수 있지만(모나드 섹션 하단의 링크 참조) 이해하기에 코드가 깔끔하진 않다. 하스켈의 간단한 입출력 예제다.
간단한 모나드 설명과 예제
 
 

Recommendations