Commit 7c68172d authored by Jorn Bruggeman's avatar Jorn Bruggeman
Browse files

when parsing initialization: immediate return after fatal_error

parent 2c77f304
......@@ -348,8 +348,11 @@ contains
select type (value => pair%value)
class is (type_scalar)
object => model%find_object(trim(pair%key))
if (.not. associated(object)) call fatal_error('parse_initialization', &
trim(value%path) // ': "' // trim(pair%key) // '" is not a member of model "' // trim(model%name) // '".')
if (.not. associated(object)) then
call fatal_error('parse_initialization', &
trim(value%path) // ': "' // trim(pair%key) // '" is not a member of model "' // trim(model%name) // '".')
return
end if
if (object%source /= source_state) call fatal_error('parse_initialization', &
trim(value%path) // ': "' // trim(pair%key) // '" is not a state variable of model "' // trim(model%name) // '".')
realvalue = value%to_real(default=real(0, real_kind), success=success)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment