Add errorType for different errorLog

when the path fails, I want to know what’s the reason causing the failure and then take action accordingly. but now it is a string (path.errorLog) which may be changed in the later release and break my project. so I suggest adding a new variable whose type is enum and represents the type path.errorLog. Then when path fails I can check the enum to take different actions.