1 /* 2 * Copyright (c) 2022 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #include "caution.h" 17 18 namespace OHOS { 19 namespace HiviewDFX { GetTriggerRule() const20uint64_t Caution::GetTriggerRule() const 21 { 22 return triggerRule_; 23 } 24 GetCautionMsg() const25std::string Caution::GetCautionMsg() const 26 { 27 return cautionMsg_; 28 } 29 GetStackTrace() const30std::string Caution::GetStackTrace() const 31 { 32 return stackTrace_; 33 } 34 SetTriggerRule(uint64_t rule)35void Caution::SetTriggerRule(uint64_t rule) 36 { 37 triggerRule_ = rule; 38 } 39 SetCautionMsg(const std::string & cautionMsg)40void Caution::SetCautionMsg(const std::string& cautionMsg) 41 { 42 cautionMsg_ = cautionMsg; 43 } 44 SetStackTrace(const std::string & stackTrace)45void Caution::SetStackTrace(const std::string& stackTrace) 46 { 47 stackTrace_ = stackTrace; 48 } 49 } // HiviewDFX 50 } // OHOS