PATH:
usr
/
local
/
jetapps
/
var
/
lib
/
3rdparty
/
backblaze
/
src
/
Exceptions
<?php namespace B2\Exceptions; /** * Author: Shlomi * Date: Sep 3, 2017 6:09:32 PM * Founder: Shlomi Bazak (SBZsoft) (c) * File: B2Exception.inc * * Description: * */ // No direct access. defined("__NSS__") or die("Restrected Access."); class B2Exception extends \Exception { private static $exceptions = [ 'bad_json' => BadJsonException::class, 'bad_value' => BadValueException::class, 'duplicate_bucket_name' => DuplicateBucketException::class, 'not_found' => NotFoundException::class, 'file_not_present' => FileNotPresentException::class, 'cannot_delete_non_empty_bucket' => CannotDeleteBucket::class, 'unauthorized' => Unauthorized::class ]; public static function genException($json){ $code = $json['code']; $message = $json['message']; if(isset(self::$exceptions[$code])){ $class = self::$exceptions[$code]; return new $class($message); } return new B2Exception($message); } }
[-] UploadFailedException.inc
[edit]
[-] CannotDeleteBucket.inc
[edit]
[+]
..
[-] BadValueException.inc
[edit]
[-] DuplicateBucketException.inc
[edit]
[-] BadPathException.inc
[edit]
[-] FileException.inc
[edit]
[-] BadJsonException.inc
[edit]
[-] UnableToOpenFileException.inc
[edit]
[-] NotFoundException.inc
[edit]
[-] B2Exception.inc
[edit]
[-] AuthException.inc
[edit]
[-] FileNotPresentException.inc
[edit]
[-] Unauthorized.inc
[edit]