aboutsummaryrefslogtreecommitdiff
path: root/zen/cmds/copy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zen/cmds/copy.cpp')
-rw-r--r--zen/cmds/copy.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/zen/cmds/copy.cpp b/zen/cmds/copy.cpp
index 2830f8c28..4ce09c982 100644
--- a/zen/cmds/copy.cpp
+++ b/zen/cmds/copy.cpp
@@ -37,10 +37,10 @@ CopyCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
// Validate arguments
if (m_CopySource.empty())
- throw std::exception("No source specified");
+ throw std::runtime_error("No source specified");
if (m_CopyTarget.empty())
- throw std::exception("No target specified");
+ throw std::runtime_error("No target specified");
std::filesystem::path FromPath;
std::filesystem::path ToPath;
@@ -53,12 +53,12 @@ CopyCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
if (!IsFileCopy && !IsDirCopy)
{
- throw std::exception("Invalid source specification (neither directory nor file)");
+ throw std::runtime_error("Invalid source specification (neither directory nor file)");
}
if (IsFileCopy && IsDirCopy)
{
- throw std::exception("Invalid source specification (both directory AND file!?)");
+ throw std::runtime_error("Invalid source specification (both directory AND file!?)");
}
if (IsDirCopy)
@@ -70,7 +70,7 @@ CopyCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
{
if (std::filesystem::is_regular_file(ToPath))
{
- throw std::exception("Attempted copy of directory into file");
+ throw std::runtime_error("Attempted copy of directory into file");
}
}
}