-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBedUnavailableException.java
More file actions
32 lines (31 loc) · 1.3 KB
/
BedUnavailableException.java
File metadata and controls
32 lines (31 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.swyth.emergencyservice.exception;
/**
* BedUnavailableException is a custom runtime exception that is thrown
* when no available beds are found in a hospital for a specific medical
* specialization.
*
* This exception typically represents a scenario where the requested
* resource (e.g., hospital bed) is not available, and can be utilized in
* applications to provide meaningful error messages and responses for clients.
*
* The exception can be handled globally or at a method level, providing
* additional context such as timestamps, HTTP status codes, and error messages.
*
* Constructors:
* - BedUnavailableException(String message): Constructs the exception with a
* specific detail message about the unavailability of resources.
*/
public class BedUnavailableException extends RuntimeException {
/**
* Constructs a new BedUnavailableException with a specific detail message.
*
* This exception is thrown when no beds are available in the specified hospital
* for the requested medical specialization. The message provides additional context
* about the unavailability of resources.
*
* @param message the detailed message explaining the reason for the exception
*/
public BedUnavailableException(String message) {
super(message);
}
}