LibreOffice Module shell (master)
1
shell
source
win32
zipfile
zipexcptn.cxx
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
* This file is part of the LibreOffice project.
4
*
5
* This Source Code Form is subject to the terms of the Mozilla Public
6
* License, v. 2.0. If a copy of the MPL was not distributed with this
7
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
*
9
* This file incorporates work covered by the following license notice:
10
*
11
* Licensed to the Apache Software Foundation (ASF) under one or more
12
* contributor license agreements. See the NOTICE file distributed
13
* with this work for additional information regarding copyright
14
* ownership. The ASF licenses this file to you under the Apache
15
* License, Version 2.0 (the "License"); you may not use this file
16
* except in compliance with the License. You may obtain a copy of
17
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
18
*/
19
20
#include <global.hxx>
21
#include "
zipexcptn.hxx
"
22
23
24
RuntimeException::RuntimeException
(
int
Error) :
25
m_Error(
Error
)
26
{
27
}
28
29
30
RuntimeException::~RuntimeException
() noexcept
31
{
32
}
33
34
35
int
RuntimeException::GetErrorCode
()
const
36
{
37
return
m_Error
;
38
}
39
40
41
ZipException::ZipException
(
int
Error) :
42
RuntimeException
(
Error
)
43
{
44
}
45
46
47
const
char
*
ZipException::what
() const noexcept
48
{
49
return
nullptr
;
50
}
51
52
53
Win32Exception::Win32Exception
(
int
Error) :
54
RuntimeException
(
Error
),
55
m_MsgBuff(nullptr)
56
{
57
}
58
59
60
Win32Exception::~Win32Exception
() noexcept
61
{
62
if
(
m_MsgBuff
)
63
LocalFree(
m_MsgBuff
);
64
}
65
66
67
const
char
*
Win32Exception::what
() const noexcept
68
{
69
if
(
m_MsgBuff
==
nullptr
)
70
{
71
FormatMessageA(
72
FORMAT_MESSAGE_ALLOCATE_BUFFER |
73
FORMAT_MESSAGE_FROM_SYSTEM |
74
FORMAT_MESSAGE_IGNORE_INSERTS,
75
nullptr
,
76
GetErrorCode
(),
77
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
// Default language
78
reinterpret_cast<
LPSTR
>
(&
m_MsgBuff
),
79
0,
80
nullptr
);
81
}
82
83
return
m_MsgBuff
;
84
}
85
86
87
ZipContentMissException::ZipContentMissException
(
int
Error) :
88
ZipException
(
Error
)
89
{
90
}
91
92
93
AccessViolationException::AccessViolationException
(
int
Error) :
94
Win32Exception
(
Error
)
95
{
96
}
97
98
99
IOException::IOException
(
int
Error) :
100
Win32Exception
(
Error
)
101
{
102
}
103
104
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
AccessViolationException::AccessViolationException
AccessViolationException(int Error)
Definition:
zipexcptn.cxx:93
IOException::IOException
IOException(int Error)
Definition:
zipexcptn.cxx:99
RuntimeException
Definition:
zipexcptn.hxx:28
RuntimeException::GetErrorCode
int GetErrorCode() const
Definition:
zipexcptn.cxx:35
RuntimeException::m_Error
int m_Error
Definition:
zipexcptn.hxx:36
RuntimeException::RuntimeException
RuntimeException(int Error)
Definition:
zipexcptn.cxx:24
RuntimeException::~RuntimeException
virtual ~RuntimeException() noexcept override
Definition:
zipexcptn.cxx:30
Win32Exception
Definition:
zipexcptn.hxx:48
Win32Exception::m_MsgBuff
char * m_MsgBuff
Definition:
zipexcptn.hxx:56
Win32Exception::Win32Exception
Win32Exception(int Error)
Definition:
zipexcptn.cxx:53
Win32Exception::what
virtual const char * what() const noexcept override
Definition:
zipexcptn.cxx:67
Win32Exception::~Win32Exception
virtual ~Win32Exception() noexcept override
Definition:
zipexcptn.cxx:60
ZipContentMissException::ZipContentMissException
ZipContentMissException(int Error)
Definition:
zipexcptn.cxx:87
ZipException
Definition:
zipexcptn.hxx:40
ZipException::what
virtual const char * what() const noexcept override
Definition:
zipexcptn.cxx:47
ZipException::ZipException
ZipException(int Error)
Definition:
zipexcptn.cxx:41
Error
Error
zipexcptn.hxx
Generated on Sun Jul 30 2023 04:26:52 for LibreOffice Module shell (master) by
1.9.3