noexcept 2.0.0
A vibe-driven, pun-powered numbered exception handler for Python coders who code by feel
License: MIT
Requires Python: >=3.8
Keywords: exceptions, error-handling, debugging, testing, logging, soft-errors, error-codes, exception-groups, python, development-tools, ai-assistant, vibe-coding, intuitive-coding, flow-state, zen-debugging, thread-safe, multiprocess, builder-pattern, puns-allowed, definitely-not-enterprise, unicorn-approved

# No Exceptions 🚫💥

*A vibe-driven, pun-powered numbered exception handler for Python coders who code by feel*

No Exceptions is an error handling system designed with vibe coders in mind, but available to everyone who is not Anish Kapoor. It is specifically designed to assist the poor AI that does all of your coding for you reflect on its poor coding choices, whilst also making the code cleaner and more readable for you, a human (probably).

Boring try-catch blocks mess with your coding flow. You code by intuition, letting your fingers dance across the keyboard while your mind vibes with the logic. **noexcept** is the exception handler designed specifically for developers who understand that good code should *feel* right!

This delightfully punny library transforms error handling from a chore into an art form. Instead of deciphering cryptic stack traces that break your zen, you get clean, numbered codes that you can `no.likey`, accumulate when things go `no.bueno`, and clear when you say `no.dice()`!

### 🔄 **no.bueno: The Subprocess Whisperer**

When your subprocess throws a tantrum, `no.bueno` catches the vibe, lets you assess the situation, and decide whether to push through or pivot. It's like having a coding sixth sense! (Which you maybe very probably do. ChatGPT.)

## ✨ What Makes It Special (And Why Your Code Will Thank You)

* **📝 Dynamic Error Codes:** Register custom error codes with witty complaints at runtime (because your errors deserve better than "Exception occurred")
* **🤫 Soft Errors:** Define codes that whisper sweet nothings instead of screaming - perfect for those "hmm, that's sus but keep going" moments  
* **🔗 Error Linking:** Chain exceptions together like a friendship bracelet of failures (every error has a backstory!)
* **📦 Exception Groups:** Bundle multiple codes into one neat package (because misery loves company, and so do batch errors)
* **🧵 Thread-Safe:** Works beautifully across multiple threads without breaking a sweat (or your sanity)
* **🚀 Multi-Process Safe:** Thanks to the magical `rememory` backend, your error codes persist across processes like digital ghosts
* **🎯 Lightweight:** Minimal overhead, maximum personality (we're not here to slow down your vibe)
* **🔧 Builder Pattern:** Fluently construct complex exceptions with `no.build()` (for when you need to architect your failures with style)

## 📦 Installation

Requires Python 3.8 or newer (because we're not *completely* reckless).

### With PIP

```bash
pip install noexcept
```

### With GitHub

```bash
pip install git+https://github.com/HiDrNikki/noexcept.git

pip install git+https://github.com/HiDrNikki/noexcept.git@v1.5.4

pip install -e git+https://github.com/HiDrNikki/noexcept.git@main#egg=noexcept
```

## 🚀 Quick Start

Time to make your errors more interesting than your code comments!

```python
from noexcept import no

# Register some codes that you really no.likey 
no.likey(404, "Not Found")                    # Classic 
no.likey(500, "Server went bye-bye")          # Dramatic
no.likey(418, "I'm a teapot", soft=True)      # RFC compliant and soft
```

### 💥 When Things Go Wrong (But In Style)

```python
try:
    no(404)  # Uh oh, something's missing
except no.way as err:
    print(err)
    # [404]
    # Not Found
```

### 🤫 Soft Errors (The Polite Ones)

Sometimes you want to complain quietly:

```python
no.likey(418, "I'm a teapot", soft=True)  # Register as soft error first

no(418)  # This just accumulates, no drama
if no.bueno:  # True means errors DID accumulate (something went wrong)
    print(f"Issues: {no.complaints}")
    no.dice()  # Clear the slate
```

**Note:** Yes, we know `no.bueno` being True means "not good" is confusing, but it was funnier this way so get over it. 🤷‍♀️

### 🔗 Exception Linking (Chain Gang Style)

When one error leads to another:

```python
try:
    raise ValueError("Somebody done screwed up, probably a smelly human")
except ValueError as fishy:
    no(500, fishy)  # Links the ValueError to code 500l
```

### 📦 Multiple Errors (Bulk Discount Not Available, But This is Freeware Anyway)

Why have one error when you can have several?

```python
no([404, 500, 418])  # Triple threat!
# This creates an ExceptionGroup with all three
```

### 🏗️ Builder Pattern (For The Architects)

Sometimes you need to craft the perfect exception:

```python
error = (no.build()
         .withCode(404, "Page missing") 
         .withCode(500, "Server sad")
         .asSoft(404)  # Make 404 soft
         .build())
```
### 🏃‍♂️ no.go (The Safety Net)

Try things safely, with automatic error wrapping:

```python
with no.go(500):
    dangerous_operation()  # Any exception becomes code 500

# Or run a function with built-in error handling
result = no.go(404, risky_function, arg1, arg2, soften=True)
```

## 📚 The Pun-derful API

### 🎯 The Main Players

- **`no.likey(code, complaint, soft=False)`** - Register error codes you definitely don't like
- **`no(code)`** - Raise that code (or go soft if it's registered that way)
- **`no.way`** - The exception class (because there's no way around it)
- **`no.go(code, func=None)`** - Safe execution context or function wrapper  
- **`no.bueno`** - Boolean indicating if soft errors accumulated
- **`no.nos`** - Dictionary of all accumulated error codes and messages
- **`no.complaints`** - List of all error messages (the complaint department)
- **`no.dice()`** - Clear all pending errors (roll the dice again)
- **`no.build()`** - Create a fluent exception builder

## 🔮 Vibe Analysis: Your Code's Sixth Sense

Ever wish you could just *feel* where your code's having a bad day? NoExcept's advanced log analysis is like having a crystal ball for your error patterns - but with math instead of mysticism!

### 🧠 AI-Powered Error Intelligence

Run the analyzer and watch it work its magic:

```bash
noexcept analyze          # Analyze last 30 days 
noexcept analyze 7        # Just the past week
noexcept analyze 90       # Go deep - 3 months of patterns
```

The analyzer doesn't just count errors - it *understands* them:

- **🕒 Temporal Weighting**: Recent errors get priority over ancient history (because that bug from 2 years ago probably isn't your current vibe killer)
- **🎯 Trouble Hotspots**: Pinpoints exactly which lines of code are having chronic anxiety
- **💥 Error Burst Detection**: Spots when your code has a complete meltdown (those cascade failure moments)
- **🔄 Pattern Recognition**: Identifies whether errors are chronic complainers or drama queens that show up randomly
- **📊 Correlation Matrix**: Discovers which errors like to hang out together (error friend groups!)

### 🤖 Built for AI Agents

The analysis generates a `LOGAGENT.md` file in the `.noexcept/` directory that's specifically designed for AI assistants to understand your codebase's pain points. It's like giving your AI coding buddy X-ray vision into your error patterns.

**What makes this analysis special?**
- **Exponential decay weighting**: Errors lose relevance over time (7-day half-life by default)
- **Context-aware hotspot detection**: Skips noexcept internals to focus on *your* code
- **Volatility scoring**: Distinguishes between "always broken" vs "sometimes dramatic"
- **Recency scoring**: Prioritizes fresh problems over stale ones

Because when you're vibing with your code, you want to know *right now* what needs attention - not what was broken when Python 2 was still a thing! 🐍✨

## 🚀 Performance & Safety

- **🧵 Thread-Safe**: Handle errors across multiple threads without fear
- **🔄 Multi-Process Safe**: Thanks to `rememory`, your error codes persist across process boundaries  
- **⚡ Lightweight**: Minimal overhead with maximum personality
- **🔧 Optimized**: Built-in caching, efficient string handling, and smart memory management

## 🤝 Why Choose noexcept?

Because life's too short for boring error handling! Whether you're building a web app, API, or just want to add some personality to your error management, noexcept makes exception handling fun again.

Perfect for developers who:
- **🎯 Code by intuition** - Trust your gut, let noexcept handle the details
- **😴 Are tired of debugging stacktraces** - Numbered codes are way more chill  
- **🎪 Think their errors should be Instagram-worthy** - #NoExceptLife #ErrorCodeAesthetic #VibeCoding
- **🤖 Work with AI assistants** - Built-in analysis that speaks fluent AI
- **🎪 Think semicolons are overrated** - Just like proper exception naming conventions
- **🧵 Build multi-threaded madness** - Thread-safe error handling that just works
- **⚡ Want batch processing superpowers** - Accumulate errors like collecting Pokemon cards
- **🎪 Want their python exceptions to be audible** - Error 404 plays sad trombone and Error 500 sounds like a server exploding (but that's coming from the server room)

*Also perfect if you just want your exceptions to have more vibe than a plain old `ValueError`. We see you.* ✨


## Contributing

Contributions are welcome! Please open issues and pull requests on GitHub.

## License

This project is licensed under the MIT License. See LICENSE for details.

Authored by Nichola Walch [littler.compression@gmail.com](mailto:littler.compression@gmail.com)

**it doesn't really make a trombone noise, come on now...