proper error message; Comments starting point is standardized

This commit is contained in:
Sharan Roongta 2020-06-18 00:17:43 +02:00
parent 0fc482585b
commit cdb4a11a2e
3 changed files with 98 additions and 95 deletions

View File

@ -554,7 +554,7 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
msg = 'invalid selection for debug' msg = 'invalid selection for debug'
!------------------------------------------------------------------------------------------------ !------------------------------------------------------------------------------------------------
! errors related to YAML input files ! errors related to YAML data
case (701) case (701)
msg = 'Incorrect indent/Null value not allowed' msg = 'Incorrect indent/Null value not allowed'
case (702) case (702)
@ -565,6 +565,8 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
msg = 'Space expected after a colon for <key>: <value> pair' msg = 'Space expected after a colon for <key>: <value> pair'
case (705) case (705)
msg = 'Unsupported feature' msg = 'Unsupported feature'
case (706)
msg = 'Access by incorrect node type'
!------------------------------------------------------------------------------------------------- !-------------------------------------------------------------------------------------------------
! errors related to the grid solver ! errors related to the grid solver

View File

@ -312,7 +312,7 @@ function tNode_asScalar(self) result(scalar)
class is(tScalar) class is(tScalar)
scalar => self scalar => self
class default class default
call IO_error(0) call IO_error(706,ext_msg='tNode_asScalar')
end select end select
end function tNode_asScalar end function tNode_asScalar
@ -330,7 +330,7 @@ function tNode_asList(self) result(list)
class is(tList) class is(tList)
list => self list => self
class default class default
call IO_error(0) call IO_error(706,ext_msg='tNode_asList')
end select end select
end function tNode_asList end function tNode_asList
@ -348,7 +348,7 @@ function tNode_asDict(self) result(dict)
class is(tDict) class is(tDict)
dict => self dict => self
class default class default
call IO_error(0) call IO_error(706,ext_msg='tNode_asDict')
end select end select
end function tNode_asDict end function tNode_asDict
@ -419,7 +419,7 @@ function tNode_get_byIndex(self,i) result(node)
integer :: j integer :: j
self_ => self%asList() self_ => self%asList()
if(i < 1 .or. i > self_%length) call IO_error(0) if(i < 1 .or. i > self_%length) call IO_error(150,ext_msg='tNode_get_byIndex')
j = 1 j = 1
item => self_%first item => self_%first
@ -642,7 +642,7 @@ function tNode_contains(self,k) result(exists)
endif endif
enddo enddo
else else
call IO_error(0) call IO_error(706,ext_msg='tNode_contains')
endif endif
end function tNode_contains end function tNode_contains

View File

@ -265,7 +265,8 @@ program DAMASK_grid
reportAndCheck: if (worldrank == 0) then reportAndCheck: if (worldrank == 0) then
write (loadcase_string, '(i0)' ) currentLoadCase write (loadcase_string, '(i0)' ) currentLoadCase
write(6,'(/,1x,a,i0)') 'load case: ', currentLoadCase write(6,'(/,1x,a,i0)') 'load case: ', currentLoadCase
if (.not. newLoadCase%followFormerTrajectory) write(6,'(2x,a)') 'drop guessing along trajectory' if (.not. newLoadCase%followFormerTrajectory) &
write(6,'(2x,a)') 'drop guessing along trajectory'
if (newLoadCase%deformation%myType == 'l') then if (newLoadCase%deformation%myType == 'l') then
do j = 1, 3 do j = 1, 3
if (any(newLoadCase%deformation%maskLogical(j,1:3) .eqv. .true.) .and. & if (any(newLoadCase%deformation%maskLogical(j,1:3) .eqv. .true.) .and. &