File tree 10 files changed +13
-13
lines changed
package-toolkit/runtime/src/main/kotlin/com/atlan/pkg/serde/cell
10 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ object CellXformer {
101
101
when (type) {
102
102
Collection ::class .java, List ::class .java -> list
103
103
Set ::class .java, SortedSet ::class .java -> TreeSet (list)
104
- else -> throw IOException (" Unable to deserialize cell to Java class: $type " )
104
+ else -> throw IOException (" Unable to deserialize cell to Java class (in $fieldName ) : $type " )
105
105
}
106
106
} else if (Map ::class .java.isAssignableFrom(type)) {
107
107
TODO (" Not yet implemented for import" )
@@ -118,7 +118,7 @@ object CellXformer {
118
118
// there should be asset references
119
119
AssetRefXformer .decode(ctx, value, fieldName)
120
120
} else {
121
- throw IOException (" Unhandled data type for $fieldName : $type " )
121
+ throw IOException (" Unhandled data type (in $fieldName ) : $type " )
122
122
}
123
123
}
124
124
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ object ConnectionXformer {
66
66
return when (fieldName) {
67
67
" connection" -> {
68
68
ctx.connectionCache.getByIdentity(assetRef)
69
- ? : throw NoSuchElementException (" Connection $assetRef not found." )
69
+ ? : throw NoSuchElementException (" Connection $assetRef not found (in $fieldName ) ." )
70
70
}
71
71
else -> AssetRefXformer .decode(ctx, assetRef, fieldName)
72
72
}
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ object DataDomainXformer {
54
54
return when (fieldName) {
55
55
DataDomain .PARENT_DOMAIN .atlanFieldName, DataProduct .DATA_DOMAIN .atlanFieldName -> {
56
56
ctx.dataDomainCache.getByIdentity(assetRef)?.trimToReference()
57
- ? : throw NoSuchElementException (" Domain $assetRef not found." )
57
+ ? : throw NoSuchElementException (" Domain $assetRef not found (in $fieldName ) ." )
58
58
}
59
59
else -> AssetRefXformer .decode(ctx, assetRef, fieldName)
60
60
}
Original file line number Diff line number Diff line change @@ -53,11 +53,11 @@ object GlossaryCategoryXformer {
53
53
return when (fieldName) {
54
54
GlossaryCategory .PARENT_CATEGORY .atlanFieldName -> {
55
55
ctx.categoryCache.getByIdentity(assetRef)?.trimToReference()
56
- ? : throw NoSuchElementException (" Parent category $assetRef not found." )
56
+ ? : throw NoSuchElementException (" Parent category $assetRef not found (in $fieldName ) ." )
57
57
}
58
58
GlossaryTerm .CATEGORIES .atlanFieldName -> {
59
59
ctx.categoryCache.getByIdentity(assetRef)?.trimToReference()
60
- ? : throw NoSuchElementException (" Category relationship $assetRef not found." )
60
+ ? : throw NoSuchElementException (" Category relationship $assetRef not found (in $fieldName ) ." )
61
61
}
62
62
else -> AssetRefXformer .decode(ctx, assetRef, fieldName)
63
63
}
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ object GlossaryTermXformer {
70
70
" assignedTerms" , in TERM_TO_TERM_FIELDS ,
71
71
->
72
72
ctx.termCache.getByIdentity(assetRef)?.trimToReference()
73
- ? : throw NoSuchElementException (" Term $assetRef not found (via $fieldName )." )
73
+ ? : throw NoSuchElementException (" Term $assetRef not found (in $fieldName )." )
74
74
else -> AssetRefXformer .decode(ctx, assetRef, fieldName)
75
75
}
76
76
}
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ object GlossaryXformer {
53
53
return when (fieldName) {
54
54
GlossaryTerm .ANCHOR .atlanFieldName -> {
55
55
ctx.glossaryCache.getByIdentity(assetRef)?.trimToReference()
56
- ? : throw NoSuchElementException (" Parent glossary $assetRef not found." )
56
+ ? : throw NoSuchElementException (" Parent glossary $assetRef not found (in $fieldName ) ." )
57
57
}
58
58
else -> AssetRefXformer .decode(ctx, assetRef, fieldName)
59
59
}
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ object GroupXformer {
53
53
// And if found by alias, return the group name (since that's what we require)
54
54
return client.groupCache.getNameForId(idFromAlias)
55
55
} catch (e: NotFoundException ) {
56
- throw NoSuchElementException (" Group name / alias $groupRef is not known to Atlan." , e)
56
+ throw NoSuchElementException (" Group name / alias $groupRef is not known to Atlan (in $fieldName ) ." , e)
57
57
}
58
58
}
59
59
}
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ object ModelAssetXformer {
93
93
.semantic(Reference .SaveSemantic .APPEND )
94
94
.build()
95
95
} else {
96
- throw NoSuchElementException (" Model asset $assetRef not found (via $fieldName )." )
96
+ throw NoSuchElementException (" Model asset $assetRef not found (in $fieldName )." )
97
97
}
98
98
}
99
99
in MODEL_ASSET_REF_FIELDS -> {
@@ -102,7 +102,7 @@ object ModelAssetXformer {
102
102
.semantic(Reference .SaveSemantic .REPLACE )
103
103
.build()
104
104
} else {
105
- throw NoSuchElementException (" Model asset $assetRef not found (via $fieldName )." )
105
+ throw NoSuchElementException (" Model asset $assetRef not found (in $fieldName )." )
106
106
}
107
107
}
108
108
else -> AssetRefXformer .decode(ctx, assetRef, fieldName)
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ object RoleXformer {
44
44
// Try to look up the user reference by username
45
45
return client.roleCache.getIdForName(roleRef)
46
46
} catch (e: NotFoundException ) {
47
- throw NoSuchElementException (" Role name $roleRef is not known to Atlan." , e)
47
+ throw NoSuchElementException (" Role name $roleRef is not known to Atlan (in $fieldName ) ." , e)
48
48
}
49
49
}
50
50
else -> roleRef
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ object UserXformer {
55
55
// And if found by email, return the username (since that's what we require)
56
56
return client.userCache.getNameForId(idFromEmail)
57
57
} catch (e: NotFoundException ) {
58
- throw NoSuchElementException (" Username / email address $userRef is not known to Atlan." , e)
58
+ throw NoSuchElementException (" Username / email address $userRef is not known to Atlan (in $fieldName ) ." , e)
59
59
}
60
60
}
61
61
}
You can’t perform that action at this time.
0 commit comments