add exception for invalid parameter errors

This commit is contained in:
Robin Appelman 2017-08-17 16:02:17 +02:00
commit 443a524491
3 changed files with 14 additions and 2 deletions

View file

@ -26,4 +26,5 @@ class ErrorCodes {
const FileIsADirectory = 'NT_STATUS_FILE_IS_A_DIRECTORY';
const NotADirectory = 'NT_STATUS_NOT_A_DIRECTORY';
const SharingViolation = 'NT_STATUS_SHARING_VIOLATION';
const InvalidParameter = 'NT_STATUS_INVALID_PARAMETER';
}

View file

@ -0,0 +1,10 @@
<?php
/**
* Copyright (c) 2014 Robin Appelman <icewind@owncloud.com>
* This file is licensed under the Licensed under the MIT license:
* http://opensource.org/licenses/MIT
*/
namespace Icewind\SMB\Exception;
class InvalidParameterException extends InvalidRequestException {}

View file

@ -39,7 +39,8 @@ class Parser {
ErrorCodes::DirectoryNotEmpty => '\Icewind\SMB\Exception\NotEmptyException',
ErrorCodes::FileIsADirectory => '\Icewind\SMB\Exception\InvalidTypeException',
ErrorCodes::NotADirectory => '\Icewind\SMB\Exception\InvalidTypeException',
ErrorCodes::SharingViolation => '\Icewind\SMB\Exception\FileInUseException'
ErrorCodes::SharingViolation => '\Icewind\SMB\Exception\FileInUseException',
ErrorCodes::InvalidParameter => '\Icewind\SMB\Exception\InvalidParameterException'
];
/**