Merge branch 'better-error-message' into 'development'

better messages for YAML parsing errors

See merge request damask/DAMASK!259
This commit is contained in:
Philip Eisenlohr 2020-10-24 15:46:25 +02:00
commit f379aecd8f
2 changed files with 5 additions and 5 deletions

View File

@ -491,7 +491,7 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
case (705)
msg = 'Unsupported feature'
case (706)
msg = 'Access by incorrect node type'
msg = 'Type mismatch in YAML data node'
case (707)
msg = 'Abrupt end of file'
case (708)

View File

@ -311,7 +311,7 @@ function tNode_asScalar(self) result(scalar)
class is(tScalar)
scalar => self
class default
call IO_error(706,ext_msg='tNode_asScalar')
call IO_error(706,ext_msg='Expected "scalar"')
end select
end function tNode_asScalar
@ -329,7 +329,7 @@ function tNode_asList(self) result(list)
class is(tList)
list => self
class default
call IO_error(706,ext_msg='tNode_asList')
call IO_error(706,ext_msg='Expected "list"')
end select
end function tNode_asList
@ -347,7 +347,7 @@ function tNode_asDict(self) result(dict)
class is(tDict)
dict => self
class default
call IO_error(706,ext_msg='tNode_asDict')
call IO_error(706,ext_msg='Expected "dict"')
end select
end function tNode_asDict
@ -641,7 +641,7 @@ function tNode_contains(self,k) result(exists)
endif
enddo
else
call IO_error(706,ext_msg='tNode_contains')
call IO_error(706,ext_msg='Expected "list" or "dict"')
endif
end function tNode_contains