LeechCraft
0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
Loading...
Searching...
No Matches
context.cpp
Go to the documentation of this file.
1
/**********************************************************************
2
* LeechCraft - modular cross-platform feature rich internet client.
3
* Copyright (C) 2006-2014 Georg Rudoy
4
*
5
* Distributed under the Boost Software License, Version 1.0.
6
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7
**********************************************************************/
8
9
#include "
context.h
"
10
11
namespace
LC::Util
12
{
13
namespace
14
{
15
auto
MakeDeadObjectMessage
(
const
detail::DeadObjectInfo&
info
)
16
{
17
const
std::string
prefix
=
"coroutine's context object "
+
info
.ClassName_;
18
if
(
info
.ObjectName_.isEmpty ())
19
return
prefix
+
" died"
;
20
else
21
return
prefix
+
" ("
+
info
.ObjectName_.toStdString () +
") died"
;
22
}
23
}
24
25
ContextDeadException::ContextDeadException
(
const
detail::DeadObjectInfo
&
info
)
26
:
std
::runtime_error {
MakeDeadObjectMessage
(
info
) }
27
{
28
}
29
30
namespace
detail
31
{
32
void
CheckDeadObjects
(
const
QVector<DeadObjectInfo>
&
deadObjects
)
33
{
34
if
(!
deadObjects
.isEmpty ())
35
throw
ContextDeadException
{
deadObjects
.front () };
36
}
37
}
38
}
LC::Util::ContextDeadException
Definition
context.h:30
LC::Util::ContextDeadException::ContextDeadException
ContextDeadException(const detail::DeadObjectInfo &info)
Definition
context.cpp:25
context.h
LC::Util::detail::CheckDeadObjects
void CheckDeadObjects(const QVector< DeadObjectInfo > &deadObjects)
Definition
context.cpp:32
LC::Util
Definition
icoreproxy.h:34
LC::Util::Filter
Container< T > Filter(const Container< T > &c, F f)
Definition
prelude.h:118
std
STL namespace.
LC::Util::detail::DeadObjectInfo
Definition
context.h:23
LC::Util::detail::Filter
Definition
typelist.h:103
src
util
threads
coro
context.cpp
Generated by
1.10.0