comparison OrthancServer/Sources/ServerContext.cpp @ 5296:5053a10da5a2

Fix orphan files remaining in storage when working with MaximumStorageSize
author Alain Mazy <am@osimis.io>
date Mon, 22 May 2023 15:00:01 +0200
parents a7d95f951f8a
children f26ed26a7793 03501a258d9e
comparison
equal deleted inserted replaced
5294:e0e2aee4453e 5296:5053a10da5a2
686 case StoreStatus_AlreadyStored: 686 case StoreStatus_AlreadyStored:
687 LOG(INFO) << "Already stored"; 687 LOG(INFO) << "Already stored";
688 break; 688 break;
689 689
690 case StoreStatus_Failure: 690 case StoreStatus_Failure:
691 LOG(ERROR) << "Store failure"; 691 LOG(ERROR) << "Unknown store failure";
692 break; 692 throw OrthancException(ErrorCode_InternalError, HttpStatus_500_InternalServerError);
693
694 case StoreStatus_StorageFull:
695 LOG(ERROR) << "Storage full";
696 throw OrthancException(ErrorCode_FullStorage, HttpStatus_507_InsufficientStorage);
693 697
694 default: 698 default:
695 // This should never happen 699 // This should never happen
696 break; 700 break;
697 } 701 }