Coverage for haystack/tools/errors.py: 100%

6 statements  

« prev     ^ index     » next       coverage.py v7.15.4, created at 2026-08-21 13:53 +0000

1# SPDX-FileCopyrightText: 2022-present deepset GmbH <info@deepset.ai> 

2# 

3# SPDX-License-Identifier: Apache-2.0 

4 

5 

6class SchemaGenerationError(Exception): 

7 """ 

8 Exception raised when automatic schema generation fails. 

9 """ 

10 

11 pass 

12 

13 

14class ToolInvocationError(Exception): 

15 """ 

16 Exception raised when a Tool invocation fails. 

17 """ 

18 

19 def __init__(self, message: str, tool_name: str) -> None: 

20 super().__init__(message) 

21 self.tool_name = tool_name