better error description

This commit is contained in:
Sharan Roongta 2020-10-23 18:43:52 +02:00
parent 995f56f69f
commit 3dbc07a26b
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) case (705)
msg = 'Unsupported feature' msg = 'Unsupported feature'
case (706) case (706)
msg = 'Access by incorrect node type' msg = 'Type mismatch in YAML data node'
case (707) case (707)
msg = 'Abrupt end of file' msg = 'Abrupt end of file'
case (708) case (708)

View File

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