-
Notifications
You must be signed in to change notification settings - Fork 536
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove references to core package
Showing
7 changed files
with
176 additions
and
155 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
from typing import Optional | ||
|
||
|
||
class NavigationException(Exception): | ||
pass | ||
|
||
|
||
class ExtractorException(Exception): | ||
pass | ||
|
||
|
||
class CannotBackException(NavigationException): | ||
def __init__(self, message="History root reached, cannot go back"): | ||
super().__init__(message) | ||
|
||
|
||
class RetrievalException(NavigationException): | ||
pass | ||
|
||
|
||
class NoElementException(RetrievalException): | ||
def __init__(self, message="No element found"): | ||
super().__init__(message) | ||
|
||
|
||
class AmbiguousException(RetrievalException): | ||
def __init__(self, message="Multiple elements could match"): | ||
super().__init__(message) | ||
|
||
|
||
class HallucinatedException(RetrievalException): | ||
def __init__(self, xpath: str, message: Optional[str] = None): | ||
super().__init__(message or f"Element was hallucinated: {xpath}") | ||
|
||
|
||
class ElementOutOfContextException(RetrievalException): | ||
def __init__(self, xpath: str, message: Optional[str] = None): | ||
super().__init__(message or f"Element exists but was not in context: {xpath}") |