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

#include "cru/common/Format.hpp"

#include <errno.h>

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

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