Refining the variational method introduced in Azé et al. [Nonlinear Anal. 49 (2002) 643-670], we givecharacterizationsof the existence of so-called global and local error bounds, for lowersemicontinuous functions defined on complete metric spaces. We thusprovide asystematic and synthetic approach to the subject, emphasizing the specialcaseof convex functions defined on arbitrary Banach spaces (refining theabstract partof Azé and Corvellec [SIAM J. Optim. 12 (2002) 913-927], and the characterization of the local metric regularityof closed-graph multifunctions between complete metric spaces.