hydrobricks
Loading...
Searching...
No Matches
Exceptions.h File Reference

Exception hierarchy for Hydrobricks. More...

#include <wx/string.h>
#include <stdexcept>
#include <string>

Go to the source code of this file.

Classes

class  HydrobricksError
 Root exception class for all Hydrobricks-specific errors. More...
 
class  InputError
 Exception for invalid user input. More...
 
class  ModelConfigError
 Exception for model configuration or conception errors. More...
 
class  NotImplemented
 Exception for unimplemented features. More...
 
class  ShouldNotHappen
 Exception for code paths that should never be reached. More...
 
class  RuntimeError
 Exception for unexpected runtime conditions. More...
 

Detailed Description

Exception hierarchy for Hydrobricks.

Exception semantics based on WHO is responsible and WHEN detected:

  • HydrobricksError: Root exception for all hydrobricks-specific errors
  • Input validation errors (std::invalid_argument semantics) - USER's fault, detected at SETUP:
    • InputError: Generic bad user input (invalid values, malformed configuration)
    • ModelConfigError: Model configuration error (unsupported operations, incompatible components)
  • Internal invariant violations (std::logic_error semantics) - PROGRAMMER's fault:
  • Runtime errors (std::runtime_error base) - SYSTEM's fault, detected at RUNTIME:
    • RuntimeError: Unexpected runtime condition (I/O failures, system resource issues)