teste sentry

This commit is contained in:
Eudes Inácio
2022-12-17 19:23:01 +01:00
parent 8abc4319ea
commit 52b9ea6c51
7 changed files with 123 additions and 10 deletions
+18
View File
@@ -16,6 +16,7 @@ import { MessageModel, DeleteMessageModel } from '../../models/beast-orm';
import { RochetChatConnectorService } from 'src/app/services/chat/rochet-chat-connector.service';
import { ChatSystemService } from 'src/app/services/chat/chat-system.service';
import { ChatService } from 'src/app/services/chat.service';
import * as Sentry from "@sentry/capacitor";
@Component({
@@ -99,7 +100,24 @@ export class LoginPage implements OnInit {
this.notificatinsservice.getAndpostToken(this.username);
}
failFunction() {
const foo: any = null;
const bar = foo.test;
}
throwJsError() {
throw new Error('Iam a manual error!')
}
captureSentryError(){
Sentry.captureException('Directly capture the error with sentry');
}
async Login() {
this.failFunction();
this.throwJsError();
this.captureSentryError();
if (this.validateUsername()) {
if(this.validatePassword()) {