Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/google/cloud/bigquery/dbapi/exceptions.py: 92%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

12 statements  

1# Copyright 2017 Google LLC 

2# 

3# Licensed under the Apache License, Version 2.0 (the "License"); 

4# you may not use this file except in compliance with the License. 

5# You may obtain a copy of the License at 

6# 

7# http://www.apache.org/licenses/LICENSE-2.0 

8# 

9# Unless required by applicable law or agreed to in writing, software 

10# distributed under the License is distributed on an "AS IS" BASIS, 

11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 

12# See the License for the specific language governing permissions and 

13# limitations under the License. 

14 

15"""Exceptions used in the Google BigQuery DB-API.""" 

16 

17 

18class Warning(Exception): 

19 """Exception raised for important DB-API warnings.""" 

20 

21 

22class Error(Exception): 

23 """Exception representing all non-warning DB-API errors.""" 

24 

25 

26class InterfaceError(Error): 

27 """DB-API error related to the database interface.""" 

28 

29 

30class DatabaseError(Error): 

31 """DB-API error related to the database.""" 

32 

33 

34class DataError(DatabaseError): 

35 """DB-API error due to problems with the processed data.""" 

36 

37 

38class OperationalError(DatabaseError): 

39 """DB-API error related to the database operation. 

40 

41 These errors are not necessarily under the control of the programmer. 

42 """ 

43 

44 

45class IntegrityError(DatabaseError): 

46 """DB-API error when integrity of the database is affected.""" 

47 

48 

49class InternalError(DatabaseError): 

50 """DB-API error when the database encounters an internal error.""" 

51 

52 

53class ProgrammingError(DatabaseError): 

54 """DB-API exception raised for programming errors.""" 

55 

56 

57class NotSupportedError(DatabaseError): 

58 """DB-API error for operations not supported by the database or API."""