mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Import the CLI, entry point, error type, coordinator dependency, and CLI tests with scripts/update_lib migrate from CPython 3.15.0 at d220409a13b77de7a6c30abe16ea90db01528edc. This frontend follows the existing offline collector/codec support. Live attach, run, and dump remain unsupported and unvalidated. Assisted-by: OpenAI Codex: model version unavailable
20 lines
724 B
Python
Vendored
20 lines
724 B
Python
Vendored
"""Custom exceptions for the sampling profiler."""
|
|
|
|
class SamplingProfilerError(Exception):
|
|
"""Base exception for sampling profiler errors."""
|
|
|
|
class SamplingUnknownProcessError(SamplingProfilerError):
|
|
def __init__(self, pid):
|
|
self.pid = pid
|
|
super().__init__(f"Process with PID '{pid}' does not exist.")
|
|
|
|
class SamplingScriptNotFoundError(SamplingProfilerError):
|
|
def __init__(self, script_path):
|
|
self.script_path = script_path
|
|
super().__init__(f"Script '{script_path}' not found.")
|
|
|
|
class SamplingModuleNotFoundError(SamplingProfilerError):
|
|
def __init__(self, module_name):
|
|
self.module_name = module_name
|
|
super().__init__(f"Module '{module_name}' not found.")
|