summaryrefslogtreecommitdiff
path: root/ucb/source/ucp/file/filglob.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-01 15:20:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-01 15:20:53 +0200
commit88dde756eb18d4b65283008b940aa432f6146e50 (patch)
tree20dee3f3861a22e802410675d35855734a7f9db2 /ucb/source/ucp/file/filglob.cxx
parent52885c7b82e6cfdd9072af2dc597edcb31192e89 (diff)
Revert "cancelCommandExecution - no need to pass exception by Any"
This reverts commit 4739b31dafc5154a2c7d6b3f0ee90686863656f0. Apparently, passing a param of type css::uno::Exception to Any will record precisely a css::uno::Exception in that Any, losing any subtype information, which this commit changed.
Diffstat (limited to 'ucb/source/ucp/file/filglob.cxx')
-rw-r--r--ucb/source/ucp/file/filglob.cxx42
1 files changed, 21 insertions, 21 deletions
diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx
index 782407ba58ce..32010ebf050e 100644
--- a/ucb/source/ucp/file/filglob.cxx
+++ b/ucb/source/ucp/file/filglob.cxx
@@ -245,11 +245,13 @@ namespace fileaccess {
bool isHandled )
{
Reference<XCommandProcessor> xComProc(pContent);
+ Any aAny;
IOErrorCode ioErrorCode;
if( errorCode == TASKHANDLER_UNSUPPORTED_COMMAND )
{
- cancelCommandExecution( UnsupportedCommandException( OSL_LOG_PREFIX ), xEnv );
+ aAny <<= UnsupportedCommandException( OSL_LOG_PREFIX );
+ cancelCommandExecution( aAny,xEnv );
}
else if( errorCode == TASKHANDLING_WRONG_SETPROPERTYVALUES_ARGUMENT ||
errorCode == TASKHANDLING_WRONG_GETPROPERTYVALUES_ARGUMENT ||
@@ -261,13 +263,13 @@ namespace fileaccess {
{
IllegalArgumentException excep;
excep.ArgumentPosition = 0;
- cancelCommandExecution(excep, xEnv);
+ cancelCommandExecution(Any(excep), xEnv);
}
else if( errorCode == TASKHANDLING_UNSUPPORTED_OPEN_MODE )
{
UnsupportedOpenModeException excep;
excep.Mode = sal::static_int_cast< sal_Int16 >(minorCode);
- cancelCommandExecution( excep,xEnv );
+ cancelCommandExecution( Any(excep),xEnv );
}
else if(errorCode == TASKHANDLING_DELETED_STATE_IN_OPEN_COMMAND ||
errorCode == TASKHANDLING_INSERTED_STATE_IN_OPEN_COMMAND ||
@@ -503,12 +505,11 @@ namespace fileaccess {
OUString("Title") :
OUString("ContentType");
- cancelCommandExecution(
- MissingPropertiesException(
- "a property is missing, necessary to create a content",
- xComProc,
- aSeq),
- xEnv);
+ aAny <<= MissingPropertiesException(
+ "a property is missing, necessary to create a content",
+ xComProc,
+ aSeq);
+ cancelCommandExecution(aAny,xEnv);
}
else if( errorCode == TASKHANDLING_FILESIZE_FOR_WRITE )
{
@@ -534,11 +535,11 @@ namespace fileaccess {
}
else if(errorCode == TASKHANDLING_INPUTSTREAM_FOR_WRITE)
{
- cancelCommandExecution(
+ aAny <<=
MissingInputStreamException(
"the inputstream is missing, necessary to create a content",
- xComProc),
- xEnv);
+ xComProc);
+ cancelCommandExecution(aAny,xEnv);
}
else if( errorCode == TASKHANDLING_NOREPLACE_FOR_WRITE )
// Overwrite = false and file exists
@@ -548,7 +549,7 @@ namespace fileaccess {
excep.Classification = InteractionClassification_ERROR;
excep.Context = Reference<XInterface>( xComProc, UNO_QUERY );
excep.Message = "file exists and overwrite forbidden";
- cancelCommandExecution( excep, xEnv );
+ cancelCommandExecution( Any(excep), xEnv );
}
else if( errorCode == TASKHANDLING_INVALID_NAME_MKDIR )
{
@@ -572,7 +573,7 @@ namespace fileaccess {
if(isHandled)
throw excep;
else {
- cancelCommandExecution( excep, xEnv );
+ cancelCommandExecution( Any(excep), xEnv );
}
// ioErrorCode = IOErrorCode_INVALID_CHARACTER;
// cancelCommandExecution(
@@ -592,7 +593,7 @@ namespace fileaccess {
if(isHandled)
throw excep;
else {
- cancelCommandExecution( excep, xEnv );
+ cancelCommandExecution( Any(excep), xEnv );
}
// ioErrorCode = IOErrorCode_ALREADY_EXISTING;
// cancelCommandExecution(
@@ -778,11 +779,10 @@ namespace fileaccess {
}
else if( errorCode == TASKHANDLING_TRANSFER_INVALIDSCHEME )
{
- cancelCommandExecution(
- InteractiveBadTransferURLException(
+ aAny <<= InteractiveBadTransferURLException(
"bad transfer url",
- xComProc),
- xEnv );
+ xComProc);
+ cancelCommandExecution( aAny,xEnv );
}
else if( errorCode == TASKHANDLING_OVERWRITE_FOR_MOVE ||
errorCode == TASKHANDLING_OVERWRITE_FOR_COPY ||
@@ -845,7 +845,7 @@ namespace fileaccess {
excep.Context = Reference<XInterface>( xComProc, UNO_QUERY );
excep.Message = "name clash during copy or move";
- cancelCommandExecution(excep, xEnv);
+ cancelCommandExecution(Any(excep), xEnv);
}
else if( errorCode == TASKHANDLING_NAMECLASHSUPPORT_FOR_MOVE ||
errorCode == TASKHANDLING_NAMECLASHSUPPORT_FOR_COPY )
@@ -855,7 +855,7 @@ namespace fileaccess {
excep.Context = Reference<XInterface>( xComProc, UNO_QUERY );
excep.Message = "name clash value not supported during copy or move";
- cancelCommandExecution(excep, xEnv);
+ cancelCommandExecution(Any(excep), xEnv);
}
else
{