Skip to content

Commit e8c7ca8

Browse files
committed
textframe(fix): Inherit ContentOverflowError from LibTmuxException
why: Follow established exception pattern for libtmux exceptions what: - Add LibTmuxException as base class alongside ValueError - Matches pattern of AdjustmentDirectionRequiresAdjustment, etc. - Enables catching all libtmux exceptions with LibTmuxException
1 parent cdb274f commit e8c7ca8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libtmux/textframe/core.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@
1313
import typing as t
1414
from dataclasses import dataclass, field
1515

16+
from libtmux.exc import LibTmuxException
17+
1618
if t.TYPE_CHECKING:
1719
from collections.abc import Sequence
1820

1921
OverflowBehavior = t.Literal["error", "truncate"]
2022

2123

22-
class ContentOverflowError(ValueError):
24+
class ContentOverflowError(LibTmuxException, ValueError):
2325
"""Raised when content does not fit into the configured frame dimensions.
2426
2527
Attributes

0 commit comments

Comments
 (0)