21 مستودعات
Encapsulating external error types within a custom type for unified reporting.
Distinct from Custom Error Interfaces: Focuses on the act of wrapping/nesting external errors, distinct from defining the interface.
Explore 21 awesome GitHub repositories matching software engineering & architecture · Error Wrapping. Refine with filters or upvote what's useful.
pkg/errors is a Go library that provides primitives for creating, annotating, and inspecting errors with stack traces and contextual information. Its core identity centers on capturing the call stack at the point of error creation or wrapping, preserving that information for later debugging and root cause analysis. The library distinguishes itself through a set of tightly integrated capabilities for error handling. It supports wrapping errors with descriptive messages while recording a new stack trace at the wrapping point, annotating existing errors with either a message or a stack trace ind
Searches through wrapped error chains to find matching errors or retrieve the root cause.
This project is a translated Go language style guide and programming standard. It provides a collection of coding standards and best practices designed to ensure that Go code remains maintainable, readable, and efficient. The guide focuses on idiomatic patterns for error handling, interface compliance, and memory optimization. It establishes standards for package naming and the use of functional options to maintain backward compatibility in constructors. It covers a broad range of capabilities, including concurrency management for coordinating process lifecycles and preventing resource leaks
Establishes standardized patterns for wrapping errors to provide context without causing duplicate log entries.
This project is an interactive programming education resource and tutorial designed for learning the Rust programming language and systems programming concepts. It provides a collection of runnable and editable code examples that serve as a practical reference for language syntax and implementation. The resource features an interactive code sandbox that allows users to execute and test code snippets in real time. It emphasizes the verification of technical accuracy by executing embedded code blocks during the build process to ensure all examples remain functional. The content covers a compre
Illustrates encapsulating external error types within a single custom type for unified error reporting.
100 Go Mistakes is a reference book and code review companion that catalogues frequent Go programming anti-patterns and provides corrected implementations for each one. It covers a wide range of common pitfalls, from range loop variable capture and interface nil handling to error wrapping and map iteration randomization, helping developers recognize and avoid these issues in their own code. The project distinguishes itself by offering a structured, example-driven approach to learning idiomatic Go. It covers core design decisions such as when to use pointer versus value receivers, how to apply
Teaches errors.Is and errors.As for inspecting wrapped errors in Go.
neverthrow is a TypeScript result type library that implements railway oriented programming. It provides a functional error handling framework using type-safe wrappers to represent operation outcomes as either success or failure variants, eliminating the need to throw exceptions. The library features adapters that convert throwing functions and asynchronous promises into typed result objects. This allows asynchronous rejections and unsafe code to be handled as explicit return values rather than uncaught exceptions. The framework covers a broad range of functional computation capabilities, in
Result converts potentially throwing functions into a consistent result type to ensure all errors are handled explicitly.
Anyhow is a dynamic error handling library for Rust applications that provides a flexible error container using type erasure. It serves as a tool for simplifying error signatures by wrapping diverse failure types into a single object, allowing for the propagation of any error that implements the standard error trait without requiring a custom enumeration for every function. The project functions as an error context provider by attaching high-level diagnostic information and recording execution stack traces at the point of failure. It enables the recovery of concrete error implementations from
Nests errors within a recursive structure to append high-level diagnostic context.
The Rust RFCs repository is the formal home for the Rust language evolution process, housing the structured design documents and community review mechanisms that govern changes to the Rust programming language, its compiler, and its standard library. It defines the complete lifecycle for proposing, discussing, and implementing substantial changes through RFC documents, from initial submission and community feedback through final comment periods and sub-team sign-offs. The repository codifies the governance and collaboration processes that shape Rust's development, including mechanisms for com
Implements the catch block construct for capturing propagated errors from ? operator usage.
go-plugin هو إطار عمل لتنفيذ معماريات الإضافات حيث تعمل الامتدادات كعمليات منفصلة وتتواصل عبر نظام إضافات Go RPC. يعمل كمكتبة اتصال بين العمليات ومدير دورة حياة يسمح للتطبيقات المضيفة باكتشاف وتشغيل ومراقبة الإضافات الثنائية الخارجية. يتيح إطار العمل أنظمة إضافات عبر اللغات، مما يسمح للإضافات المكتوبة بلغات مختلفة بالتكامل مع مضيف من خلال بروتوكولات RPC موحدة. يتميز بجسر RPC ثنائي الاتجاه يسمح لكل من المضيف والإضافة بتبادل تنفيذات الواجهة لتبادل البيانات المعقد والمعاودة. يوفر النظام عزل العمليات عن طريق تنفيذ الإضافات كعمليات فرعية مستقلة، مما يضمن أن أعطال الإضافات لا تنهي التطبيق المضيف. يغطي الأمان من خلال مصادقة TLS المتبادلة والتحقق من السلامة، بالإضافة إلى تنسيق دورة الحياة بما في ذلك إعادة إرفاق العملية ذات الحالة للحفاظ على الاتصال أثناء ترقيات المضيف. تشمل القدرات الإضافية اكتشاف الثنائيات، وإصدار البروتوكول، ومزامنة سجلات الإضافة وتدفقات المخرجات مرة أخرى إلى المضيف.
Provides a mechanism to wrap plugin errors into transferable structures to preserve error context across process boundaries.
Typia is a compile-time code generator that transforms TypeScript type annotations into runtime validation, serialization, and schema functions without requiring decorators or separate schema files. It generates optimized validation and serialization code during TypeScript compilation, producing dedicated functions for each type that eliminate runtime schema objects for faster execution. The project extends this core capability into several integrated areas. It generates fully typed client SDKs from NestJS controller source code, keeping server and client types synchronized automatically. It
Throws a structured error on the first mismatched field, returning the input unchanged on success.
redux-logger هو مسجل حالة Redux ومصحح أخطاء حالة JavaScript مصمم لتسجيل الإجراءات وانتقالات الحالة في وحدة تحكم المتصفح. يعمل كبرنامج وسيط (middleware) يلتقط تغييرات الحالة وحمولات الإجراءات داخل مخزن Redux للمساعدة في تصحيح أخطاء تدفق التطبيق. يوفر المشروع منسقاً لسجلات وحدة التحكم لتخصيص مظهر السجلات باستخدام الألوان والطوابع الزمنية ومدد التنفيذ. يسمح بتقييد الإجراءات المسجلة من خلال مسندات (predicates) مخصصة لتقليل ضجيج وحدة التحكم، ويتضمن إمكانيات لتحويل بيانات الحالة المعقدة إلى تنسيقات قابلة للقراءة. تغطي الأداة تتبع أخطاء الواجهة الأمامية من خلال اعتراض وتسجيل الأخطاء التي تطلقها إجراءات معينة. كما يتيح تحليل انتقال الحالة من خلال تسجيل تحديثات الحالة الناتجة بعد الإجراءات المرسلة.
Implements a pipeline that wraps action failures to capture metadata before re-throwing exceptions.
هذا المشروع عبارة عن مسجل حالة Redux وأداة لتصحيح أخطاء وحدة التحكم. يعمل كبرنامج وسيط (middleware) لخط أنابيب إرسال Redux، ويعمل كمتتبع لانتقال الحالة يسجل الإجراءات وتغييرات الحالة مباشرة في وحدة تحكم المتصفح. تسمح الأداة باعتراض الإجراءات لتسجيل التوقيت والحمولات وانتقالات الحالة. وتوفر إمكانيات لتصفية إجراءات معينة باستخدام دوال المسند (predicate functions) لتقليل الضجيج وتحويل الحالة المعقدة أو البيانات غير القابلة للتغيير إلى تنسيقات قابلة للقراءة لتسهيل الفحص. تتضمن الأداة خيارات لتخصيص مخرجات وحدة التحكم من خلال الطوابع الزمنية والألوان وتتبع المدة. كما تلتقط الأخطاء أثناء دورة معالجة الإجراءات لتسجيل سياق الفشل مع الحفاظ على مسار تصحيح الأخطاء.
Wraps exceptions during the dispatch cycle to provide failure context without disrupting the application flow.
Provides a utility that wraps require calls in try-catch blocks for graceful module loading.
This project is a localized educational resource for learning the Rust programming language, providing a comprehensive guide and technical specifications translated into Simplified Chinese. It serves as an instructional tool for studying language idioms, memory management, and type systems. The repository focuses on software documentation localization, converting official guides into Simplified Chinese to increase accessibility for non-English speakers. It utilizes a markdown-based system to organize content and supports multi-format export to static HTML, PDF, and EPUB formats for both web a
Teaches how to inspect the kind of error returned to execute specific recovery logic based on the cause.
thiserror هي مكتبة معالجة أخطاء Rust وماكرو إجرائي مصمم لتحديد أنواع أخطاء مخصصة. تعمل كمؤتمت لتنفيذ السمات (trait) الذي يولد الكود اللازم لسمات خطأ المكتبة القياسية في وقت التجميع. تركز المكتبة على القضاء على الكود المتكرر (boilerplate) باستخدام ماكرو derive لتنفيذ طرق العرض والمصدر تلقائياً. تسمح بإنشاء هياكل أخطاء مخصصة وتعدادات يمكنها تعيين أخطاء منخفضة المستوى إلى متغيرات عالية المستوى مع الحفاظ على السبب الأصلي ومعلومات التتبع (backtrace). تغطي قدراتها تنسيق الأخطاء المخصص من خلال استيفاء القالب، وإدارة انتشار الخطأ، ودمج تتبعات المكدس لتصحيح الأخطاء. كما توفر آليات لأتمتة تحويل الخطأ وتتبع أصول الخطأ عبر حقول مخصصة.
Wraps lower-level errors within custom types to maintain the error chain while providing a unified interface.
Radash هي مكتبة أدوات وظيفية لـ TypeScript مصممة لتحويل البيانات، والتحقق من الصحة، وإدارة سير العمل. توفر مجموعة من دوال المساعدة المكتوبة بأنواع لمعالجة المصفوفات، والكائنات، والسلاسل. يتميز المشروع بمجموعة أدوات سير عمل غير متزامنة لإدارة الوعود، وإعادة المحاولات، وحدود التزامن، إلى جانب مجموعة من أدوات التحقق المنطقية للتحقق من الأنواع البدائية، والكائنات، والوعود. كما يطبق أنماط البرمجة الوظيفية مثل تكوين الدوال، والتطبيق الجزئي، وأنماط الاستجابة الأولى للخطأ. تغطي المكتبة مساحة واسعة من القدرات، بما في ذلك إدارة حالة الكائن مع الاستنساخ والدمج العميق، ومعالجات المصفوفات المعقدة، وتنسيق السلاسل. توفر بالإضافة إلى ذلك أدوات لتحسين التنفيذ، مثل تحديد المعدل وتخزين النتائج مؤقتاً.
Implements a utility to wrap function calls, capturing exceptions to return error-first responses instead of throwing.
Scala.js هو مترجم وسلسلة أدوات لغة عبر المنصات تحول كود مصدر Scala إلى JavaScript أو WebAssembly. تعمل كأداة مكتوبة بشكل ثابت لنظام JavaScript البيئي، مما يتيح تطوير تطبيقات لمتصفحات الويب وبيئات Node.js. يعمل المشروع كإطار عمل للتوافق مع JavaScript، مما يسمح بإنشاء واجهات وربط آمنة للأنواع للتفاعل مع المكتبات الخارجية والكائنات العالمية. يوفر آليات لاستدعاء JavaScript الثابت والديناميكي، بما في ذلك إنشاء روابط TypeScript والقدرة على تصدير المنطق الداخلي للاستخدام في كود JavaScript خارجي. تتضمن سلسلة الأدوات أداة بناء واجهة أمامية لتجميع الإنتاج وتحسين المخرجات، بما في ذلك إزالة الكود الميت وتقسيم الوحدات. تغطي مساحة واسعة من القدرات بما في ذلك التحقق من نوع عنصر DOM لتطوير واجهة المستخدم، ومشاركة الكود عبر المنصات للتطوير الكامل (full-stack)، وأطر اختبار متنوعة للتحقق من عناصر البناء المحسنة. يمكن تنفيذ النصوص المجمعة مباشرة داخل بيئة سطر الأوامر باستخدام مترجم JavaScript.
Provides a type-safe wrapper class to encapsulate native JavaScript errors for consistent error handling in Scala.
ozzo-validation is a programmable data validation library for Go that verifies structs, maps, and primitive types using a declarative, rule-based approach. It functions as an interface-based validator, allowing for the recursive checking of nested data structures and custom types without the use of struct tags. The framework distinguishes itself as a context-aware validation engine, supporting the propagation of request-scoped data to rules that depend on external state. It provides extensive extensibility through custom rule definitions and the ability to override default failure text with l
Wraps specific errors to signal a system exception rather than a user-input validation failure.
Cast هي مكتبة تحويل أنواع في Go وأداة صب أنواع البيانات مصممة لتحويل أنواع البيانات الأولية المختلفة إلى تنسيقات مستهدفة محددة. تعمل كمحول أنواع أولية يدير تحويل أنواع Go الأساسية مع التعامل مع البيانات غير المتوافقة. توفر المكتبة آليات للتعامل مع الأنواع الديناميكية، مما يسمح للنظام بمعالجة البيانات غير المكتوبة أو بيانات الواجهة وصب القيم بأمان في أنواع ملموسة أثناء وقت التشغيل. تتضمن منطقاً للتمييز بين نتائج القيمة الصفرية الناجحة والتحويلات الفاشلة من خلال الإبلاغ الصريح عن الأخطاء والتحقق.
Implements custom error wrapping to distinguish between invalid input data and successful zero-value conversion results.
msgspec is a high-performance data modeling, serialization, and schema validation toolkit for Python. It serves as a type-safe serialization framework that integrates schema enforcement and data parsing into a single pass, functioning as both a data serialization library and a schema validation system based on standard Python type annotations. The project distinguishes itself through high-performance structural primitives, including compilation-based routine generation and zero-copy buffer parsing. It optimizes memory usage via garbage collection-aware layouts and reduces processing overhead
Distinguishes between syntax errors in serialized data and schema validation failures during decoding.
Pothos is a code-first GraphQL schema builder and framework designed for type-safe development. It allows developers to construct schemas using typed definitions in TypeScript, eliminating the need for external code generation steps. The framework distinguishes itself through a dedicated data mapper that connects GraphQL types to relational databases and ORMs, such as Prisma, while optimizing query resolution. It provides a full implementation of the Relay specification, including global object identification and cursor-based pagination. The project covers several core capability areas, incl
Wraps resolver results in sum types that automatically resolve to error objects when exceptions are thrown.