Skip to content

Commit

Permalink
use react_native_assert instead of LOG(FATAL)
Browse files Browse the repository at this point in the history
  • Loading branch information
acoates-ms committed Dec 10, 2024
1 parent b5bf535 commit dcf2190
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#pragma once

#include <ReactCommon/SchedulerPriority.h>
#include <react/debug/react_native_assert.h>
#include <chrono>
#include <glog/logging.h>

namespace facebook::react {

Expand All @@ -32,7 +32,7 @@ static inline SchedulerPriority fromRawValue(double value) {
case 5:
return SchedulerPriority::IdlePriority;
}
LOG(FATAL) << "Unknown SchedulerPriority";
react_native_assert(false && "Unsupported SchedulerPriority value");
return SchedulerPriority::NormalPriority;
}

Expand All @@ -50,7 +50,7 @@ static inline std::chrono::milliseconds timeoutForSchedulerPriority(
case SchedulerPriority::IdlePriority:
return std::chrono::minutes(5);
}
LOG(FATAL) << "Unknown SchedulerPriority";
react_native_assert(false && "Unsupported SchedulerPriority value");
return std::chrono::seconds(5);
}

Expand Down

0 comments on commit dcf2190

Please sign in to comment.