2010-10-12 15:53:47 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-12 22:04:38 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2006-09-17 01:50:11 +00:00
|
|
|
|
2000-09-18 15:18:56 +00:00
|
|
|
#include "java/lang/Throwable.hxx"
|
|
|
|
#include "java/tools.hxx"
|
|
|
|
using namespace connectivity;
|
2014-02-25 17:59:09 +01:00
|
|
|
|
2000-09-18 15:18:56 +00:00
|
|
|
//************ Class: java.lang.Throwable
|
2014-02-25 17:59:09 +01:00
|
|
|
|
2000-09-18 15:18:56 +00:00
|
|
|
|
2015-11-10 10:12:07 +01:00
|
|
|
jclass java_lang_Throwable::theClass = nullptr;
|
2000-09-18 15:18:56 +00:00
|
|
|
|
|
|
|
java_lang_Throwable::~java_lang_Throwable()
|
|
|
|
{}
|
|
|
|
|
2009-04-23 10:42:05 +00:00
|
|
|
jclass java_lang_Throwable::getMyClass() const
|
2000-09-18 15:18:56 +00:00
|
|
|
{
|
2009-04-23 10:42:05 +00:00
|
|
|
return st_getMyClass();
|
2000-09-18 15:18:56 +00:00
|
|
|
}
|
2009-04-23 10:42:05 +00:00
|
|
|
jclass java_lang_Throwable::st_getMyClass()
|
2000-09-18 15:18:56 +00:00
|
|
|
{
|
2011-03-23 23:16:24 +01:00
|
|
|
// the class needs to be fetched only once, that is why it is static
|
2009-04-23 10:42:05 +00:00
|
|
|
if( !theClass )
|
|
|
|
theClass = findMyClass("java/lang/Throwable");
|
|
|
|
return theClass;
|
2000-09-18 15:18:56 +00:00
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-18 15:18:56 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString java_lang_Throwable::getMessage() const
|
2000-09-18 15:18:56 +00:00
|
|
|
{
|
2015-11-10 10:12:07 +01:00
|
|
|
static jmethodID mID(nullptr);
|
2009-04-23 10:42:05 +00:00
|
|
|
return callStringMethod("getMessage",mID);
|
2000-09-18 15:18:56 +00:00
|
|
|
}
|
2014-02-22 21:20:15 +01:00
|
|
|
|
2000-09-18 15:18:56 +00:00
|
|
|
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString java_lang_Throwable::getLocalizedMessage() const
|
2000-09-18 15:18:56 +00:00
|
|
|
{
|
2015-11-10 10:12:07 +01:00
|
|
|
static jmethodID mID(nullptr);
|
2009-04-23 10:42:05 +00:00
|
|
|
return callStringMethod("getLocalizedMessage",mID);
|
2000-09-18 15:18:56 +00:00
|
|
|
}
|
2000-11-22 13:44:26 +00:00
|
|
|
|
2012-09-24 09:50:57 +02:00
|
|
|
#if OSL_DEBUG_LEVEL > 0
|
|
|
|
void java_lang_Throwable::printStackTrace() const
|
|
|
|
{
|
2015-11-10 10:12:07 +01:00
|
|
|
static jmethodID mID(nullptr);
|
2014-10-25 15:39:47 +01:00
|
|
|
return callVoidMethod_ThrowSQL("printStackTrace",mID);
|
2012-09-24 09:50:57 +02:00
|
|
|
}
|
|
|
|
#endif
|
2000-09-18 15:18:56 +00:00
|
|
|
|
2010-10-12 15:53:47 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|