Skip to content

Commit 44a8bc5

Browse files
committed
More informative error messages
1 parent 386d409 commit 44a8bc5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/nf/nf_layer_submodule.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ elemental module function get_num_params(self) result(num_params)
296296
type is (rnn_layer)
297297
num_params = this_layer % get_num_params()
298298
class default
299-
error stop 'Unknown layer type.'
299+
error stop 'get_num_params() with unknown layer type.'
300300
end select
301301

302302
end function get_num_params
@@ -323,7 +323,7 @@ pure module function get_params(self) result(params)
323323
type is (rnn_layer)
324324
params = this_layer % get_params()
325325
class default
326-
error stop 'Unknown layer type.'
326+
error stop 'get_params() with unknown layer type.'
327327
end select
328328

329329
end function get_params
@@ -348,7 +348,7 @@ pure module function get_gradients(self) result(gradients)
348348
type is (reshape3d_layer)
349349
! No gradients to get.
350350
class default
351-
error stop 'Unknown layer type.'
351+
error stop 'get_gradients() with unknown layer type.'
352352
end select
353353

354354
end function get_gradients
@@ -405,7 +405,7 @@ module subroutine set_params(self, params)
405405
// 'on a zero-parameter layer; nothing to do.'
406406

407407
class default
408-
error stop 'Unknown layer type.'
408+
error stop 'set_params() with unknown layer type.'
409409
end select
410410

411411
end subroutine set_params

0 commit comments

Comments
 (0)