In the plasma equilibrium theory, Gajewski's analytical expression [Gajewski, Phys. Fluids 15, 70 (1972)] for the poloidal magnetic flux ψ outside the plasma is known. It was obtained as a solution of the two-dimensional Laplace equation outside an infinite straight cylinder with an elliptical cross section and a uniform current density j ζ. An example of its use for analysis of static configurations is given in the study by Porcelli and Yolbarsop [Phys. Plasmas 26, 054501 (2019)]. Here, we consider the question of its applicability in dynamic problems including, for example, the current quench (CQ) or vertical displacement event (VDE), when the electromagnetic response of the vacuum vessel to the plasma magnetic field evolution has to be accounted for. It is shown that the mentioned cylindrical model does not provide enough information for calculation of the current induced in the wall. Mathematically, this manifests itself in the fact that Gajewski's expression contains an indefinite constant of integration ψ b (hereinafter it is ψ at the plasma boundary), which, in analytical applications, is replaced either by zero or by a value that makes ψ = 0 on the magnetic axis. This does not affect the magnitude of the magnetic field B, but it would incorrectly give the electric field at ∂ B / ∂ t ≠ 0. To eliminate this shortcoming, an additional block of calculations in the toroidal geometry is needed. Here, the problem is solved analytically. The resulting final expression with ψ b well-defined in the toroidal configuration also includes the effects of the Shafranov's shift and inhomogeneity of j ζ. The proposed extensions allow generalization of the earlier results to a wider area and cover such events as CQ or VDE.