Better error handling

This commit is contained in:
Pieter Vander Vennet 2024-07-31 11:10:35 +02:00
parent f227689208
commit 913c17a76e
2 changed files with 9 additions and 4 deletions

View file

@ -557,7 +557,7 @@ export class Changes {
}
}
public static fragmentChanges(
public fragmentChanges(
pending: ChangeDescription[],
objects: OsmObject[]
): {
@ -576,7 +576,7 @@ export class Changes {
if (createdIds.has(c.id)) {
toUpload.push(c)
} else {
reportError(
(this._reportError)(
`Got an orphaned change. The 'creation'-change description for ${c.type}/${c.id} got lost. Permanently dropping this change:` +
JSON.stringify(c)
)
@ -706,7 +706,7 @@ export class Changes {
...perBinMessage,
]
let { toUpload, refused } = Changes.fragmentChanges(pending, objects)
let { toUpload, refused } = this.fragmentChanges(pending, objects)
await this._changesetHandler.UploadChangeset(
(csId, remappings) => {