An elliptic boundary-value problem with discontinuous nonlinearity of exponential growth at infinity is investigated. The existence theorem for a weak semiregular solution of this problem is deduced by the variational method. The semiregularity of a solution means that its values are points of continuity of the nonlinearity with respect to the phase variable almost everywhere in the domain where the boundary-value problem is considered. The variational approach used is based on the concept of a quasipotential operator, unlike the traditional approach, which uses Clarke's generalized derivative