"Our Rabbis taught: When R. Eleazar b. Perata and R. Hanina b. Teradion were arrested, R. Eleazar b. Perata said to R. Hanina b. Teradion: Happy art thou that thou hast been arrested on one charge; woe is me, for I am arrested on five charges. R. Hanina replied: Happy art thou, who hast been arrested on five charges, but wilt be rescued; woe is me who, though having been arrested on one charge, will not be rescued; for thou hast occupied thyself with [the study of] the Torah as well as with acts of benevolence, whereas I occupied myself with Torah alone.
This accords with the opinion of R. Huna. For R. Huna said: He who only occupies himself with the study of the Torah is as if he had no God, for it is said: Now for long seasons Israel was without the true God. What is meant by 'without the true God'? — It means that he who only occupies himself with the study of the Torah is as if he had no God."
-Talmud, Avodah Zara 17b