File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ object HealthProfessionalData {
3636 val role : HealthProfessionalRole
3737 ) {
3838 init {
39- require (healthProfessionalId.isNotEmpty()) {
40- throw IllegalArgumentException ( " Invalid HealthProfessional ID!" )
39+ check (healthProfessionalId.isNotEmpty()) {
40+ " Invalid HealthProfessional ID!"
4141 }
4242 }
4343
Original file line number Diff line number Diff line change @@ -23,12 +23,12 @@ data class User(
2323 val password : String ,
2424) {
2525 init {
26- require (userId.isNotEmpty()) {
27- throw IllegalArgumentException ( " Invalid userId!" )
26+ check (userId.isNotEmpty()) {
27+ " Invalid userId!"
2828 }
2929
30- require (password.length in PASSWORD_MIN_LENGTH .. PASSWORD_MAX_LENGTH ) {
31- throw IllegalArgumentException ( " Invalid user password!" )
30+ check (password.length in PASSWORD_MIN_LENGTH .. PASSWORD_MAX_LENGTH ) {
31+ " Invalid user password!"
3232 }
3333 }
3434
You can’t perform that action at this time.
0 commit comments