Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Exceptions should inherit from Terra where suitable #741

Merged
merged 2 commits into from
Oct 3, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Changed inheritance of exception classes
merav-aharoni committed Oct 1, 2023
commit 1647e69b6ad5b03fff13b0b2cdef726d8eabe593
5 changes: 3 additions & 2 deletions qiskit_ibm_provider/qpy/exceptions.py
Original file line number Diff line number Diff line change
@@ -12,10 +12,11 @@

"""Exception for errors raised by the pulse module."""
from typing import Any
from qiskit.exceptions import QiskitError
from qiskit.qpy.exceptions import QpyError
from ..exceptions import IBMError


class QpyError(QiskitError):
class IBMQpyError(QpyError, IBMError):
"""Errors raised by the qpy module."""

def __init__(self, *message: Any):
9 changes: 1 addition & 8 deletions qiskit_ibm_provider/visualization/exceptions.py
Original file line number Diff line number Diff line change
@@ -12,14 +12,7 @@

"""Exceptions related to the visualization modules."""

from ..exceptions import IBMError


class VisualizationError(IBMError):
"""Base class for errors raised by the visualization modules."""

pass

from qiskit.visualization.exceptions import VisualizationError

class VisualizationValueError(VisualizationError, ValueError):
"""Value errors raised by the visualization modules."""