Files
python/exercises/practice/circular-buffer/circular_buffer.py
BethanyG bac3c1361d [Practice Exercises]: Add Better Error Handling Instructions & Tests for Error Raising Messages (# 2 of 8) (#2691)
* Edited instrucitons.apped to have better error handling instructions.

* Edited Jinja2 template and exemplar to have proper error message.

* Regenerated test file.

* Added instructions append with error handling message.

* Altered JinJa2 template for error handling and adjusted example to have error classes.

* Regenerated test cases.

* Updated stub wit new error classes.

* Added error handling instructions append.

* Adjusted JinJa2 template to test for specific message.

* Regenerated test file.

* Added instructions apped for error handling.

* Added instructions append for error handling and adjusted example and test file.

* Corrected syntax error.
2021-10-25 18:36:44 +02:00

36 lines
606 B
Python

class BufferFullException(BufferError):
"""Exception raised when CircularBuffer is full.
message: explanation of the error.
"""
def __init__(self, message):
pass
class BufferEmptyException(BufferError):
"""Exception raised when CircularBuffer is empty.
message: explanation of the error.
"""
def __init__(self, message):
pass
class CircularBuffer:
def __init__(self, capacity):
pass
def read(self):
pass
def write(self, data):
pass
def overwrite(self, data):
pass
def clear(self):
pass