@@ -103,27 +103,13 @@ inline int64_t f$error_reporting(Optional<int64_t> new_error_level_opt = {}) noe
103103 return current_error_level;
104104 }
105105
106- int64_t new_error_level{new_error_level_opt.val ()};
107- if (new_error_level != 0 && (new_error_level & ErrorHandlingState::SUPPORTED_ERROR_LEVELS ) == 0 ) {
108- // ignore error_level if it's unsupported
109- return current_error_level;
110- }
111106 error_handling_st.minimum_log_level = 0 ;
112- if (new_error_level == 0 ) {
113- return current_error_level;
114- } else if ((new_error_level & E_ALL ) == E_ALL ) {
115- error_handling_st.minimum_log_level |= static_cast <int64_t >(E_ALL );
107+ if (int64_t new_error_level{new_error_level_opt.val ()}; new_error_level == 0 ) {
116108 return current_error_level;
117109 }
118110
119- if ((new_error_level & E_NOTICE ) == E_NOTICE ) {
120- error_handling_st.minimum_log_level |= static_cast <int64_t >(E_NOTICE );
121- }
122- if ((new_error_level & E_WARNING ) == E_WARNING ) {
123- error_handling_st.minimum_log_level |= static_cast <int64_t >(E_WARNING );
124- }
125- if ((new_error_level & E_ERROR ) == E_ERROR ) {
126- error_handling_st.minimum_log_level |= static_cast <int64_t >(E_ERROR );
127- }
111+ // currently only minimum_log_level == 0 and minimum_log_level == E_ALL are supported,
112+ // because behavior in the runtime/ and runtime-light/ is different. we will fix this in the future.
113+ error_handling_st.minimum_log_level = static_cast <int64_t >(E_ALL );
128114 return current_error_level;
129115}
0 commit comments