I have two functions, and I want to combine them to define a certain function.

Suppose for every fixed $e$ in $(0, ∞)$, we have a function $g_e (x): \mathbb{R} \to [0,\infty]$ that is well defined a.e. and right continuous, and for every fixed x in R, we have a function $h_x (e): (0, ∞) \to [0, ∞]$ that is well defined a.e. and monotone increasing. Further, whenever $e$ and $x$ are such that they are both defined, $g_e (x) = h_x (e)$.

Can we canonically define some $f: \mathbb{R} \times (0, \infty)\to [0,\infty]$ such that it is well defined a.e. and $f(x, e) = g_e (x) = h_x (e)$ a.e.?