I would claim this is a natural result of the fact that TeX is a macro language that works by expansion. As such a definition that you make in your package will not be code that is executed but largely code that expands to other code (possibly from other packages) and so it is not at all clear what you mean by "not the error line inside the package itself (respect to the package file)".
To give you a (fully nonsense) example of this, consider the following code:
% this here could be in package A that you loaded or in the kernel
\def\foo !#1!{*#1*}
\def\bar{\foo !test!}
% this here would be in your package
\def\gobbleabit#1#2{#1}
\def\baz { \expandafter \gobbleabit \bar }
% this would be in your document:
\baz
now if you run this through TeX (or LaTeX) then you you will get
! Use of \foo doesn't match its definition.
\bar ->\foo !t
est!
l.11 \baz
And where is the error? In package "A" where \foo and \bar was defined, or in your package that defined \baz in a way that it gobbled away the "!" needed to execute \foo?
I would say the error was in your package.
However, if we alter the example a bit to
% this here would be in package A
\def\foo !#1!{*#1*}
\def\bar{\foo test!}
% this here would be in your package
\def\baz { \bar ... }
% this would be in your document:
\baz
we will get nearly the same error message:
! Use of \foo doesn't match its definition.
\bar ->\foo t
est!
l.11 \baz
but this time the fault is in package A with a wrong definition of \bar. Bottom line, the best you can do in such languages is to give a stack trace which is what TeX does.
If you want to see the full stack trace of all ongoing expansions, set \errorcontextlines=\maxdimen and then you will also see all intermediate parts of the stack (and how far TeX has read in each level of expansion), in this case one more:
! Use of \foo doesn't match its definition.
\bar ->\foo t
est!
\baz -> \bar
...
l.11 \baz