comparison OrthancServer/Sources/ServerContext.cpp @ 5497:4dd50c4b985a pg-transactions

merge default -> pg-transactions
author Alain Mazy <am@osimis.io>
date Tue, 23 Jan 2024 17:05:28 +0100
parents 38f1d06875ad e4294feb0a3a
children b74543e7ac2e
comparison
equal deleted inserted replaced
5494:3e02be2ccaee 5497:4dd50c4b985a
1 /** 1 /**
2 * Orthanc - A Lightweight, RESTful DICOM Store 2 * Orthanc - A Lightweight, RESTful DICOM Store
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics 3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
4 * Department, University Hospital of Liege, Belgium 4 * Department, University Hospital of Liege, Belgium
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium 5 * Copyright (C) 2017-2024 Osimis S.A., Belgium
6 * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium 6 * Copyright (C) 2021-2024 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
7 * 7 *
8 * This program is free software: you can redistribute it and/or 8 * This program is free software: you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as 9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation, either version 3 of the 10 * published by the Free Software Foundation, either version 3 of the
11 * License, or (at your option) any later version. 11 * License, or (at your option) any later version.
757 { 757 {
758 // skip logs in case of reconstruction 758 // skip logs in case of reconstruction
759 switch (result.GetStatus()) 759 switch (result.GetStatus())
760 { 760 {
761 case StoreStatus_Success: 761 case StoreStatus_Success:
762 LOG(INFO) << "New instance stored"; 762 LOG(INFO) << "New instance stored (" << resultPublicId << ")";
763 break; 763 break;
764 764
765 case StoreStatus_AlreadyStored: 765 case StoreStatus_AlreadyStored:
766 LOG(INFO) << "Already stored"; 766 LOG(INFO) << "Instance already stored (" << resultPublicId << ")";
767 break; 767 break;
768 768
769 case StoreStatus_Failure: 769 case StoreStatus_Failure:
770 LOG(ERROR) << "Unknown store failure"; 770 LOG(ERROR) << "Unknown store failure while storing instance " << resultPublicId;
771 throw OrthancException(ErrorCode_InternalError, HttpStatus_500_InternalServerError); 771 throw OrthancException(ErrorCode_InternalError, HttpStatus_500_InternalServerError);
772 772
773 case StoreStatus_StorageFull: 773 case StoreStatus_StorageFull:
774 LOG(ERROR) << "Storage full"; 774 LOG(ERROR) << "Storage full while storing instance " << resultPublicId;
775 throw OrthancException(ErrorCode_FullStorage, HttpStatus_507_InsufficientStorage); 775 throw OrthancException(ErrorCode_FullStorage, HttpStatus_507_InsufficientStorage);
776 776
777 default: 777 default:
778 // This should never happen 778 // This should never happen
779 break; 779 break;