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
+1 -1
View File
@@ -82,7 +82,7 @@ import { FirebaseX } from '@ionic-native/firebase-x/ngx'; */
Sentry.init(
{
dsn: 'https://9920cc36f1d740b987426ee8d80cf588@o4504340905525248.ingest.sentry.io/4504340946419712',
dsn: 'https://5b345a3ae70b4e4da463da65881b4aaa@o4504340905525248.ingest.sentry.io/4504345615794176',
// To set your release and dist versions
release: 'gabinetedigital@1.0.0',
dist: '1',
-7
View File
@@ -20,9 +20,6 @@ import { RouteService } from 'src/app/services/route.service';
import { NativeNotificationService } from 'src/app/services/native-notification.service';
import { UserSession } from '../models/user.model';
import { PermissionList } from '../models/permission/permissionList';
import * as Sentry from "@sentry/capacitor";
@Component({
@@ -133,10 +130,6 @@ export class HomePage implements OnInit {
ngOnInit() {
Sentry.captureException('Test Captured Exception');
throw new Error('Test Thrown Error');
Sentry.nativeCrash();
this.logDeviceInfo();
this.notificationsService.onReciveForeground();
+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()) {