A lightweight, TypeScript-ready error constructor for Node.js and browsers with customizable error codes, details, and logging.