Skip to content

Commit e1438ac

Browse files
committed
better handling of login failure
1 parent bc257e8 commit e1438ac

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/Parser.php

+10-9
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,16 @@ class Parser {
3030
// todo replace with static once <5.6 support is dropped
3131
// see error.h
3232
private static $exceptionMap = [
33-
ErrorCodes::PathNotFound => '\Icewind\SMB\Exception\NotFoundException',
34-
ErrorCodes::ObjectNotFound => '\Icewind\SMB\Exception\NotFoundException',
35-
ErrorCodes::NoSuchFile => '\Icewind\SMB\Exception\NotFoundException',
36-
ErrorCodes::NameCollision => '\Icewind\SMB\Exception\AlreadyExistsException',
37-
ErrorCodes::AccessDenied => '\Icewind\SMB\Exception\AccessDeniedException',
38-
ErrorCodes::DirectoryNotEmpty => '\Icewind\SMB\Exception\NotEmptyException',
39-
ErrorCodes::FileIsADirectory => '\Icewind\SMB\Exception\InvalidTypeException',
40-
ErrorCodes::NotADirectory => '\Icewind\SMB\Exception\InvalidTypeException',
41-
ErrorCodes::SharingViolation => '\Icewind\SMB\Exception\FileInUseException'
33+
ErrorCodes::LogonFailure => AuthenticationException::class,
34+
ErrorCodes::PathNotFound => NotFoundException::class,
35+
ErrorCodes::ObjectNotFound => NotFoundException::class,
36+
ErrorCodes::NoSuchFile => NotFoundException::class,
37+
ErrorCodes::NameCollision => AlreadyExistsException::class,
38+
ErrorCodes::AccessDenied => AccessDeniedException::class,
39+
ErrorCodes::DirectoryNotEmpty => NotEmptyException::class,
40+
ErrorCodes::FileIsADirectory => InvalidTypeException::class,
41+
ErrorCodes::NotADirectory => InvalidTypeException::class,
42+
ErrorCodes::SharingViolation => FileInUseException::class
4243
];
4344

4445
/**

0 commit comments

Comments
 (0)