Skip to content

Commit

Permalink
Improved error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
rneder committed Jan 16, 2025
1 parent 02a614f commit 6c76cc9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib_f90/lib_timer_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,17 @@ subroutine lib_timer(line)
call get_params (line, ianz, cpara, lpara, maxw, lp)
call get_optional(ianz, MAXW, cpara, lpara, NOPTIONAL, ncalc, &
oname, loname, opara, lopara, lpresent, owerte)
if(ianz/=0) then ! Wrong parameter number, forgot a ':'?
ier_num = -6
ier_typ = ER_COMM
ier_msg(1) = 'Timer detected non-optional parameters.'
ier_msg(2) = 'Check that all parameters are of style:'
ier_msg(3) = ' name:value '
if(ianz> 0 .and. ianz <= MAXW) then
ier_msg(4) = 'Offending param is ' // cpara(ianz)(1:lpara(ianz))
endif
return
endif
!
lstart = .true.
lcpu = .true.
Expand Down

0 comments on commit 6c76cc9

Please sign in to comment.