Skip to content

add: note to DataAccessException introduction.#362

Open
bsharplydian wants to merge 1 commit intosoftwareconstruction240:mainfrom
bsharplydian:patch-2
Open

add: note to DataAccessException introduction.#362
bsharplydian wants to merge 1 commit intosoftwareconstruction240:mainfrom
bsharplydian:patch-2

Conversation

@bsharplydian
Copy link
Copy Markdown
Contributor

This indicates that adding more Exception classes could be helpful for organization, but doesn't prescribe any details.


The starter code includes a `dataAccess.DataAccessException`. This exception should be thrown by data access methods that could fail. If a method call fails, it should throw a `DataAccessException`. For example, the `DataAccessException` is thrown if a user attempts to update a non-existent game. If you like, feel free to create subclasses of DataAccessException that represent more specific errors relating to data access.

> [!NOTE]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be helpful to give an example of why you might want to add other classes and possibly point to the exception instruction rather than the note.

We might want to enhance the exception instruction to actually give an example in the custom exception section that shows how to extend the exception class and why you would do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants