MODFLOW 6  version 6.9.0.dev0
USGS Modular Hydrologic Model
featureflagsmodule Module Reference

Disable development features in release mode.

Functions/Subroutines

pure logical function, public is_release_mode ()
 True if development features should be disabled. More...
 
subroutine, public developmode (errmsg, iunit)
 Terminate if in release mode (guard development features) More...
 

Function/Subroutine Documentation

◆ developmode()

subroutine, public featureflagsmodule::developmode ( character(len=*), intent(in)  errmsg,
integer(i4b), intent(in), optional  iunit 
)

Terminate the program with an error if the IDEVELOPMODE flag is set to 0. This allows developing features on the mainline while disabling them in release builds. An optional file unit may be specified to associate the feature with an input file.

Definition at line 25 of file FeatureFlags.f90.

26  ! -- dummy
27  character(len=*), intent(in) :: errmsg
28  integer(I4B), intent(in), optional :: iunit
29 
30  ! -- store error and terminate if in release mode
31  if (is_release_mode()) then
32  if (present(iunit)) then
33  call store_error(errmsg, terminate=.false.)
34  call store_error_unit(iunit, terminate=.true.)
35  else
36  call store_error(errmsg, terminate=.true.)
37  end if
38  end if
39 
Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_release_mode()

pure logical function, public featureflagsmodule::is_release_mode

Definition at line 13 of file FeatureFlags.f90.

14  is_release_mode = (idevelopmode == 0)
Here is the caller graph for this function: