Android Question code module is null?

leitor79

Active Member
Licensed User
Longtime User
Hi,

Is this OK?

"Config" is a code module. Why is null? That line gives me the following exception:

java.lang.Exception: java.lang.reflect.InvocationTargetException

Besides, the exception is not intercepted in the catch shown in the image, but in the catch block of the ActualizarSinLeer caller.

This code block is part of a class.


Regards,
 

leitor79

Active Member
Licensed User
Longtime User
Hi Erel, Hi Eme, thanks for your answer.
This is the full error:


And this is the code of GetSQL:

B4X:
Public Sub GetSQL() As SQL
   
    Dim rSQL As SQL
   
    Try
       
        If oSQL=Null Or oSQL.IsInitialized=False Then
            oSQL.Initialize(File.DirInternal, "dbfile", False)
        End If
               
        rSQL=oSQL

    Catch
        Log("Config - GetSQL - " & LastException.Message)
    End Try

    Return rSQL
   
End Sub

oSQL is declared as Public oSQL As SQL at module's Process_Globals.

Thank you very much!
 
Upvote 0

Eme Fibonacci

Well-Known Member
Licensed User
Longtime User
oSQL is declared as Public oSQL As SQL at module's Process_Globals.

Hi,

oSQL is Public? But you are declaring oSQL again.
See the image of the first post. Just below m.put ("...

Sorry if this is not the case.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…