Skip to content
Snippets Groups Projects
Commit d7eb19c4 authored by WAUTELET Philippe's avatar WAUTELET Philippe
Browse files

Philippe 17/03/2021: budgets: improve error detection in Budget_source_id_find

parent 30811b80
No related branches found
No related tags found
No related merge requests found
......@@ -292,7 +292,22 @@ subroutine Budget_source_id_find( tpbudget, hsource, kid )
if ( iid > 0 ) then
call Print_msg( NVERB_DEBUG, 'BUD', 'Budget_source_id_find', trim( tpbudget%cname )//':'//trim( hsource )//' found' )
else
call Print_msg( NVERB_ERROR, 'BUD', 'Budget_source_id_find', trim( tpbudget%cname )//':'//trim( hsource )//' not found' )
!Search also in the non-available source term list
do ji = tpbudget%nsources + 1, tpbudget%nsourcesmax
if ( trim( hsource ) == trim( tpbudget%tsources(ji)%cmnhname ) ) then
iid = ji
exit
end if
end do
if ( iid == 0 ) then
call Print_msg( NVERB_ERROR, 'BUD', 'Budget_source_id_find', trim( tpbudget%cname )//':'//trim( hsource )//' not found' )
else
cmnhmsg(1) = Trim( tpbudget%cname ) // ':' // Trim( hsource ) // ' found'
cmnhmsg(2) = 'in non-available source term list.'
cmnhmsg(3) = 'Check availability condition in Ini_budget.'
call Print_msg( NVERB_ERROR, 'BUD', 'Budget_source_id_find' )
end if
end if
kid = iid
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment