aboutsummaryrefslogtreecommitdiff
path: root/src/common/platform/unix/ErrnoException.cpp
blob: 14e6a5a2a308cd1fa43a043945d29c1b2ffaff07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include "cru/common/platform/unix/ErrnoException.hpp"

#include "cru/common/Format.hpp"

#include <errno.h>

namespace cru::platform::unix {
ErrnoException::ErrnoException(const String& message)
    : ErrnoException(message, errno) {}

ErrnoException::ErrnoException(const String& message, int errno_code)
    : PlatformException(Format(u"{}. Errno is {}.", message, errno_code)),
      errno_code_(errno_code) {}
}  // namespace cru::platform::unix