michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim: set ts=2 et sw=2 tw=80: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "ReportInternalError.h" michael@0: michael@0: #include "mozilla/IntegerPrintfMacros.h" michael@0: michael@0: #include "nsContentUtils.h" michael@0: #include "nsPrintfCString.h" michael@0: michael@0: BEGIN_INDEXEDDB_NAMESPACE michael@0: michael@0: void michael@0: ReportInternalError(const char* aFile, uint32_t aLine, const char* aStr) michael@0: { michael@0: // Get leaf of file path michael@0: for (const char* p = aFile; *p; ++p) { michael@0: if (*p == '/' && *(p + 1)) { michael@0: aFile = p + 1; michael@0: } michael@0: } michael@0: michael@0: nsContentUtils::LogSimpleConsoleError( michael@0: NS_ConvertUTF8toUTF16(nsPrintfCString( michael@0: "IndexedDB %s: %s:%lu", aStr, aFile, aLine)), michael@0: "indexedDB"); michael@0: } michael@0: michael@0: END_INDEXEDDB_NAMESPACE