Make error reporting around _g_enum_nick_to_value() more consistent
This commit is contained in:
parent
3418c22250
commit
091bb38286
@ -49,8 +49,11 @@ public class Matrix.Event.CallAnswer : Matrix.Event.Call {
|
||||
_answer_type = typ;
|
||||
} else {
|
||||
_answer_type = CallAnswerType.UNKNOWN;
|
||||
warning("Unknown value %s for content.answer.type in a m.call.answer event",
|
||||
node.get_string());
|
||||
|
||||
if (Config.DEBUG) {
|
||||
warning("Unknown value %s for content.answer.type in a m.call.answer event",
|
||||
node.get_string());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
warning("content.answer.type is missing from a m.call.answer event");
|
||||
|
@ -57,8 +57,11 @@ public class Matrix.Event.CallInvite : Matrix.Event.Call {
|
||||
_offer_type = typ;
|
||||
} else {
|
||||
_offer_type = CallOfferType.UNKNOWN;
|
||||
warning("Unknown value %s in content.offer.type of a m.call.invite event",
|
||||
node.get_string());
|
||||
|
||||
if (Config.DEBUG) {
|
||||
warning("Unknown value %s in content.offer.type of a m.call.invite event",
|
||||
node.get_string());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
warning("content.offer.type is missing from a m.call.invite event");
|
||||
|
@ -56,8 +56,10 @@ public class Matrix.Event.RoomGuestAccess : Matrix.Event.State {
|
||||
} else {
|
||||
_guest_access = GuestAccess.UNKNOWN;
|
||||
|
||||
warning("Unknown value '%s' in a m.room.guest_access event",
|
||||
node.get_string());
|
||||
if (Config.DEBUG) {
|
||||
warning("Unknown value '%s' in a m.room.guest_access event",
|
||||
node.get_string());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
warning("content.guest_access is missing from a m.room.guest_access event");
|
||||
|
@ -55,6 +55,10 @@ public class Matrix.Event.RoomHistoryVisibility : Matrix.Event.State {
|
||||
_visibility = vis;
|
||||
} else {
|
||||
_visibility = Matrix.HistoryVisibility.UNKNOWN;
|
||||
|
||||
if (Config.DEBUG) {
|
||||
warning("Unknown history_visibility value %s", node.get_string());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,8 +51,10 @@ public class Matrix.Event.RoomJoinRules : Matrix.Event.State {
|
||||
} else {
|
||||
_join_rules = Matrix.JoinRules.UNKNOWN;
|
||||
|
||||
warning("Unknown value %s in a m.room.join_rules event",
|
||||
node.get_string());
|
||||
if (Config.DEBUG) {
|
||||
warning("Unknown value %s in a m.room.join_rules event",
|
||||
node.get_string());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
_join_rules = Matrix.JoinRules.UNKNOWN;
|
||||
|
Loading…
Reference in New Issue
Block a user