Currently, it is difficult to handle errors when parsing various representations of a chemical structure (such as SMILES, Molfile, etc.) via RDKit Python API. On success, the MolFrom... methods return rdkit.Chem.rdchem.Mol objects on success. If parsing fails for whatever reason, these me...
private fun userErrorHanlder(ex: Exception) { //handle errors here } viewModel.searchUser(editText.text.toString()).observe(this, object : Kobserver<ResponseModel>(::userErrorHanlder) { override fun onSuccess(data: ResponseModel) { if (data.items.isEmpty()) { toggleViews(false) return } ...