Skip to main content
error loading Epitech Logo error loading Jarbin-ToolKit Logo

📦 Jarbin-ToolKit:Error v0.1.6.2

Structured exception hierarchy system providing deterministic error modeling, contextual linking, and extensible error classification.


🔹 Short Description

Jarbin-ToolKit Error is a structured exception framework that extends Python’s base exception system with contextual linking, categorized error types, and standardized formatting for deterministic error reporting.

It provides:

  • structured exception hierarchy
  • contextual file/line linking system
  • specialized error subclasses
  • standardized string formatting for logs and CLI output

It is not a logging system, but a structured error abstraction layer over Python exceptions.


🔹 Authors

  • Nathan (Jarjarbin06)
  • Jarbin Studio

🔹 License

GPL v3


🔹 Target Audience

This library is intended for:

  • Python developers building structured frameworks
  • systems requiring standardized error reporting
  • CLI tools needing formatted exception output
  • modular applications with layered exception handling

🔹 Platform Support

  • Python ≥ 3.10
  • Standard library only (no external dependencies required)
  • Cross-platform (Linux / Windows / macOS)

🔹 Purpose

Jarbin-ToolKit Error aims to:

  • provide structured and extensible exception types
  • standardize error representation across systems
  • attach contextual metadata (file / line references)
  • improve debugging clarity through formatted output

It is not a logging framework, but a deterministic exception modeling system built on Python exceptions.


🔹 Key Features

  • Base Error exception class
  • Structured error subclasses (Type, Value, Import, Config, etc.)
  • Contextual linking via file and line metadata
  • ANSI-formatted terminal output
  • Standardized string and debug representations
  • Optional logging integration hook (disabled by default)

🔹 Architecture Overview

Application Layer
        │
        ▼
   Error(Exception)
        │
   ┌────┴────────────────────────────┐
   ▼                                 ▼
ErrorType                      ErrorValue
ErrorImport                   ErrorConfig
ErrorLog                     ErrorSetting
ErrorAttribute              ErrorLaunch
        │
        ▼
Context System (link_data)
        │
        ▼
Formatted Output (ANSI CLI / logs)

🔹 Core Concept

The system is built around a single base exception class extended by specialized error types.

Error

Base exception class:

Error(message, error, link)

Supports:

  • custom error message
  • error category label
  • optional file/line linkage
  • formatted terminal output

Error Subclasses

Each subclass represents a semantic category:

ErrorType
ErrorValue
ErrorImport
ErrorConfig
ErrorLog
ErrorSetting
ErrorAttribute
ErrorLaunch

All inherit from Error and append a deterministic identifier.


Optional contextual metadata:

("file.py", 42)

Converted into:

  • File "file.py"
  • or File "file.py", line 42

Used to improve debugging traceability.


🔹 API / Function Documentation

🔹 Error

Name Description
__init__ Initializes error with message, type, and link
log Optional logging hook (disabled in current state)
create_link Builds human-readable file/line reference
__str__ ANSI-formatted runtime error output
__repr__ Debug representation

🔹 Error Subclasses

Class Description
ErrorType Type-related errors
ErrorValue Value-related errors
ErrorImport Import failures
ErrorConfig Configuration-related errors
ErrorLog Logging system errors
ErrorSetting Runtime setting errors
ErrorAttribute Attribute access errors
ErrorLaunch Initialization/boot errors

🔹 Project Structure

jarbin_toolkit_error/
├── error.py
└── __init__.py

🔹 Usage Section

🔹 Basic Error Raising

from jarbin_toolkit_error import Error

raise Error("Something went wrong", error="RuntimeError")

🔹 Structured Error Types

from jarbin_toolkit_error import ErrorValue

raise ErrorValue("Invalid input provided")

🔹 Contextual Linking

raise ErrorType(
    "Type mismatch detected",
    link=("main.py", 42)
)

🔹 Exception Display Output

Errors are formatted with:

  • ANSI color coding
  • structured message blocks
  • optional file/line context

🔹 Build / Installation

Installation

pip install jarbin-toolkit-error

🔹 Execution Behavior

  • Errors are synchronous exceptions
  • No automatic capture system
  • Logging is disabled by default (log() is a stub)
  • Context generation is optional and explicit

🔹 Memory Model

  • Each Error stores:

    • message (str)
    • error type label (str)
    • link metadata (tuple or None)
    • formatted link string

No external state is required.


🔹 Design Philosophy

  • explicit error classification over generic exceptions
  • structured debugging context over raw messages
  • deterministic formatting for CLI consistency
  • extensible error taxonomy

🔹 Current State

⚠️ Core error hierarchy is stable and functional

Status:

  • base exception system implemented
  • structured subclasses implemented
  • link system implemented
  • formatted output implemented

Limitations:

  • logging integration incomplete
  • no stack trace enhancement layer
  • ANSI formatting not configurable
  • no serialization support

🔹 Limitations

  • no integrated logging backend
  • no JSON export of errors
  • limited runtime introspection
  • ANSI formatting may not be portable in all environments
  • logging hooks currently disabled

🔹 Extension / Contribution

Possible extensions:

  • structured logging integration
  • JSON / YAML error serialization
  • stack trace enrichment system
  • centralized error registry
  • log file integration layer

🔹 Notes

This module is designed as a deterministic error abstraction layer, not a full logging or monitoring system.

It prioritizes:

  • clarity
  • structured classification
  • debugging precision

🔹 Identity Summary

Jarbin-ToolKit Error is:

  • a structured exception hierarchy
  • a deterministic error modeling system
  • a contextual debugging abstraction layer
  • a CLI-friendly formatted error framework

🔹 Final Rule

If an error is not classified or contextualized, it is not structured.


Metadata

Release files for jarbin-toolkit-error 0.1.6.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jarbin-toolkit-error 0.1.6.2
File Size Uploaded Provenance Actions
jarbin_toolkit_error-0.1.6.2.tar.gz 32.6 kB Without provenance Details for jarbin_toolkit_error-0.1.6.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jarbin-toolkit-error 0.1.6.2
File Interpreter ABI Platform Actions
jarbin_toolkit_error-0.1.6.2-py3-none-any.whl Python 3 none any Details for jarbin_toolkit_error-0.1.6.2-py3-none-any.whl

Total release size: 55.5 kB

Release files / jarbin_toolkit_error-0.1.6.2.tar.gz

Download URL jarbin_toolkit_error-0.1.6.2.tar.gz
Size 32.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8ddafcdc2d901aee995ee4da71ec8f0d48f6714036b48bf651e79521d310f8c0
BLAKE2b-256 checksum
How to use checksums
3014036e8e63a3b88e943a4d3e54ae76273326b91f4d52052cd6477cedb9d70f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / jarbin_toolkit_error-0.1.6.2-py3-none-any.whl

Download URL jarbin_toolkit_error-0.1.6.2-py3-none-any.whl
Size 22.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
58cb5f460e4ef570f3d253f11cfa58b6ac389e672a69a0a008fa943ebf553ae5
BLAKE2b-256 checksum
How to use checksums
134ddb520a8d4a9e50a0ee635f531ebffff52552f3dba248501a16657a416d28
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Security for jarbin-toolkit-error 0.1.6.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page