From e93de729765efc0d1be11c579266035e87ed5d8a Mon Sep 17 00:00:00 2001
From: Eric Cano <Eric.Cano@cern.ch>
Date: Thu, 16 Aug 2018 08:59:16 +0200
Subject: [PATCH] Changed error type for zero length file and added file path.

USerError will prevent the frontend from logging a stack trace.
File path will allow easier identification of problem files.
---
 scheduler/Scheduler.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scheduler/Scheduler.cpp b/scheduler/Scheduler.cpp
index 11c6e198fb..851a72538d 100644
--- a/scheduler/Scheduler.cpp
+++ b/scheduler/Scheduler.cpp
@@ -124,7 +124,7 @@ void Scheduler::queueArchiveWithGivenId(const uint64_t archiveFileId, const std:
   using utils::midEllipsis;
   
   if (!request.fileSize)
-    throw cta::exception::Exception("Rejecting archive request for zero-length file.");
+    throw cta::exception::UserError(std::string("Rejecting archive request for zero-length file: ")+request.diskFileInfo.path);
 
   const auto queueCriteria = m_catalogue.getArchiveFileQueueCriteria(instanceName, request.storageClass,
     request.requester);
-- 
GitLab