What a strange behaviour. I typeset the file within TeXShop and it gave me a runaway argument with the precise position in the code. I missed a curly bracket on a \url command. Thats it.
Why does TM responds with such wrong error messages and not with a precise one?
TM does not try to compile your file, it delegates that task to pdflatex. So does TeXShop. In theory they are calling the same program. So I see no reason for the discrepancy. Please provide a minimal reproducible and clear example.
Well, differences can arise because of the preference settings in the latex bundle (assuming that they are not overridden by a TeX directive at the start of the document) and by using a different engine in TeXShop. Check to see if the engine corresponds to your preferences in the latex bundle in TM (option command ,). Best, Mark